backgroundColor property

Color? backgroundColor
final

The fill color to use for an app bar's Material.

If null, then the AppBarTheme.backgroundColor is used. If that value is also null: In Material v2 (i.e., when ThemeData.useMaterial3 is false), then AppBar uses the overall theme's ColorScheme.primary if the overall theme's brightness is Brightness.light, and ColorScheme.surface if the overall theme's brightness is Brightness.dark. In Material v3 (i.e., when ThemeData.useMaterial3 is true), then AppBar uses the overall theme's ColorScheme.surface

If this color is a MaterialStateColor it will be resolved against MaterialState.scrolledUnder when the content of the app's primary scrollable overlaps the app bar.

This property is used to configure an AppBar.

Implementation

final Color? backgroundColor;