[英]Flutter : add a space between title and subtitle in ListTile
How can I add a space between title
and subtitle
in ListTile
?如何在ListTile
的title
和subtitle
之间添加空格?
ListTile(
title: Text(" xxxxxxxx"),
subtitle: Text("From: to"),
),
ListTile(
title: Padding(
padding: const EdgeInsets.only(bottom: 10.0),
child: Text(" xxxxxxxx"),,
),
subtitle:Text("From: to"),
)
You can wrap your Text widget of title
into Padding widget and pass padding
bottom
of your desired gap like below:您可以将title
的Text小部件包装到Padding小部件中,并传递所需间隙的padding
bottom
,如下所示:
ListTile(
title: Padding(
padding: const EdgeInsets.only(bottom: 15.0),
child: Text("title"),
),
subtitle: Text("Subtitle"),
)
You can use SizedBox
widget with it's height
property also between your title
and subtitle
.您也可以在title
和subtitle
之间使用具有height
属性的SizedBox
小部件。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.