[英]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.
我将小部件放在副标题中,因为我想在其中放 2 个文本,但是我遇到了问题,副标题文本左侧有空格。 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在你的副标题 => Container => child => Column 添加
crossAxisAlignment: CrossAxisAlignment.start
Is that what you have asked?这是你问的吗?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.