Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Align ListTile Icon to Left

Tags:

flutter

dart

Is there a way to align an icon before the title using a ListTile? I know that trailing aligns the icon after the title. Is there a reverse way?

like image 525
Joseph Arriaza Avatar asked Aug 08 '18 22:08

Joseph Arriaza


People also ask

How do you customize a ListTile in flutter?

You can change the ListTile's appearance by directly modifying its properties such as color, shape, and size. Here's how you can change the ListTile's background color, text color, and icon color: return ListTile( // 1. tileColor: Colors.

How do you center the contents of a ListTile in flutter?

How to Center the Title of a ListTile In Flutter ? Center Widget is a widget that centers its child within itself or in other words we can say that it will wrap any widget to center to its parent widget.

Is a three line ListTile a flutter?

By default, the ListTile in flutter can display only 2 lines. The Title and the SubTitle. In case there is a third line of text to be displayed, the isThreeLine is set to true and can allow another line to be present. The subtitle will be taking care of giving the 3rd line of text.


1 Answers

leading property is what you are looking for:

  ListTile(
        leading: Icon(Icons.access_alarm),
         ...
      )

Refer to this documentation ListTile-leading

like image 160
diegoveloper Avatar answered Sep 23 '22 12:09

diegoveloper