Remove padding from ListTile between leading and title

EDIT: After Flutter 2.0 upgrade

As Dinesh has pointed out here, ListTile has received a minLeadingWidth property.

Default value is 40, so to reduce space between leading and title by x pass minLeadingWidth: 40 - x.


Align results will depend on text and tile width.

Use Transform.translate for consistent results.

ListTile(
  leading: Icon(icon),
  title: Transform.translate(
    offset: Offset(-16, 0),
    child: Text('Some text'),
  ),
);

You can use the minLeadingWidth on your ListTile. The default value is 40, so you can use a lower value to make your leading and title come closer.

ListTile(
  leading : Icon(Icons.settings),
  title : Text("Settings"),
  minLeadingWidth : 10,
);

Tags:

Dart

Flutter