[我正在使用 RadioListTile
用于用单选按钮显示动态数据,但是I want显示相同的列表,并带有用于编辑列表数据的尾随图标。
您能帮我扑朔迷离吗?
RadioListTile(
groupValue: _currentIndex,
title: Text(
// addres["address_1"],
addres["firstname"] +
addres["lastname"] +
addres["address_1"] +
addres["city"] +
addres["country"],
overflow: TextOverflow.ellipsis,
maxLines: 3,
style: TextStyle(color: Colors.black, fontSize: 16.0),
),
value: int.parse(addres["address_id"]),
onChanged: (val) {
setState(() {
_currentIndex = val;
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => PickanAddresspage(selected_address: addres['address_id'],)));
});
},
)
在标题中,您可以使用Row来包装文本和图标代码段
RadioListTile<SingingCharacter>(
title: Row(
children: <Widget>[
Text(
"firstname" + "lastname" + "address_1" + "city" + "country",
overflow: TextOverflow.ellipsis,
maxLines: 3,
style: TextStyle(color: Colors.black, fontSize: 16.0),
),
InkWell(
child: Icon(
Icons.audiotrack,
color: Colors.green,
size: 30.0,
),
)
],
),