How can I add a space between title
and subtitle
in ListTile
?
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:
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
.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.