简体   繁体   中英

ListTile subtitle modified with card flutter

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,
      ),
    );
  },
),

In your subtitle => Container => child => Column add

crossAxisAlignment: CrossAxisAlignment.start

Is that what you have asked?

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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM