Reputation: 185
How can I add a space between title
and subtitle
in ListTile
?
ListTile(
title: Text(" xxxxxxxx"),
subtitle: Text("From: to"),
),
Upvotes: 11
Views: 14312
Reputation: 47
You can give height property, in the style of Text, add in the subtitle to add space between title and subtitle.
ListTile(
title: Text("xxxxx",
style: TextStyle(fontSize: 18),
),
subtitle: Text("xxxxxx"
style: TextStyle(fontSize: 16, height: 2),
),
),
Upvotes: 4
Reputation: 612
ListTile(
title: Padding(
padding: const EdgeInsets.only(bottom: 10.0),
child: Text(" xxxxxxxx"),,
),
subtitle:Text("From: to"),
)
Upvotes: 5
Reputation: 3514
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"),
)
Upvotes: 17