1

My output

enter image description here

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

2 Answers 2

1

enter image description hereTry this:

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) { }, ), ), 
Sign up to request clarification or add additional context in comments.

Comments

1

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

enter image description here

1 Comment

@DasunDola did you get what you want? or is there any problem?

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.