My output
How to align horizontally this Icon , Text and radio button.Radio button and text display nicely but Icon and text are not align horizontally. How make this?
my code
ListTile(
leading: Icon(
Icons.brightness_1,
color: Colors.black,
size: 13,
),
minLeadingWidth: 2,
title: Text("Can you understand?"),
trailing: Radio(
value: "talk",
groupValue: level,
onChanged: (value) {
setState(() {
level = value.toString();
});
},
),
),
CodePudding user response:
You can try this for leading
:
leading: Container(
height: 24,
width: 24,
alignment: Alignment.center,
child: Icon(
Icons.brightness_1,
color: Colors.black,
size: 13,
),
),
CodePudding user response:
ListTile(
leading: Column(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Icon(
Icons.brightness_1,
color: Colors.black,
size: 13,
),
],
),
minLeadingWidth: 2,
title: Text("Can you understand?"),
trailing: Radio(
value: "talk",
groupValue: "level",
onChanged: (value) {
},
),
),