navigationBarBackgroundSchemeColor property

SchemeColor? navigationBarBackgroundSchemeColor
final

Select which color from the theme's ColorScheme to use as background color for the NavigationBar.

All colors in the color scheme are not good choices, but some work well.

If undefined, defaults to SchemeColor.background in M2 and in M3 to ColorScheme.surface, with an ColorScheme.primary used as overlay color with hard coded overlay elevation 3.

If useFlutterDefaults true, and this property is undefined, the effective M2 background color will be ColorScheme.surface, with an ColorScheme.onSurface used as overlay color with hard coded overlay elevation 3. The actual Flutter SDK elevation is also hard coded to 0.

FlexColorScheme sets background defaults of NavigationRail, NavigationBar and BottomNavigationBar to ColorScheme.background when it using opinionated component sub-themes. Flutter SDK uses different colors on all three widgets. Our opinion is that they should all default to using the same ColorScheme based color. FlexColorScheme uses and recommends background color as this default. The ColorScheme.background was chosen as it is the same that the Drawer uses as well, so when using tinted backgrounds where surface and background are different, they will still match.

Implementation

final SchemeColor? navigationBarBackgroundSchemeColor;