foregroundColor property Null safety

Color? foregroundColor
final

The default color for Text and Icons within the app bar.

If null, then AppBarTheme.foregroundColor is used. If that value is also null, then AppBar uses the overall theme's ColorScheme.onPrimary if the overall theme's brightness is Brightness.light, and ColorScheme.onSurface if the overall theme's brightness is Brightness.dark.

This color is used to configure DefaultTextStyle that contains the toolbar's children, and the default IconTheme widgets that are created if iconTheme and actionsIconTheme are null.

This property is used to configure an AppBar.

Implementation

final Color? foregroundColor;