MaterialApp ThemeData iconTheme

Issue

I have some ListTile widgets around my app, and all of them have an icon.

From here I see that I need to override my ListTile with

ListTileTheme(
  iconColor: Colors.blue,
  child: ..
)

since the ListTile.iconColor is gray by default and doesn’t fallback to ThemeData.iconTheme.iconColor.

I wonder if there is a way to specify the list tile theme in ThemeData, so I don’t have to create a new widget just for that.

Solution

For now, there isn’t, but this feature may arrive in the next flutter release: https://github.com/flutter/flutter/issues/31247

Answered By – Fernando Santos

Answer Checked By – Willingham (FlutterFixes Volunteer)

Leave a Reply

Your email address will not be published. Required fields are marked *