Reputation: 1111
I want to make title and subtitle parallel with title. I put widget in subtitle because I want to put 2 text in it but I have problem there is space in left of the subtitle texts. What should I do?
Here is it my code
ListView.builder(
itemCount: data == null ? 0 : data.length,
itemBuilder: (BuildContext context, int index) {
return Card(
child: ListTile(
leading: Icon(
data[index]['is_started_scan'] ? Icons.check_circle : Icons.cancel,
size: 50.0,
color: data[index]['is_started_scan']
? Colors.greenAccent
: Colors.redAccent,
),
title: Text(data[index]['title']),
subtitle: Container(
child: (Column(
children: <Widget>[
Text(data[index]['time'], style: TextStyle(fontSize: 13)),
Text(data[index]['venue_name'], style: TextStyle(fontSize: 12)),
],
)),
),
trailing: Icon(Icons.navigate_next),
isThreeLine: true,
),
);
},
),
Upvotes: 1
Views: 1608
Reputation: 4402
In your subtitle => Container => child => Column add
crossAxisAlignment: CrossAxisAlignment.start
Is that what you have asked?
Upvotes: 3