color property Null safety

Color? color

The color to use when drawing the icon.

Defaults to the current IconTheme color, if any.

The color (whether specified explicitly here or obtained from the IconTheme) will be further adjusted by the opacity of the current IconTheme, if any.

In material apps, if there is a Theme without any IconThemes specified, icon colors default to white if the theme is dark and black if the theme is light.

If no IconTheme and no Theme is specified, icons will default to black.

See Theme to set the current theme and ThemeData.brightness for setting the current theme's brightness.

Typically, a Material Design color will be used, as follows:


final Color? color;