navigationRailBackgroundSchemeColor property

SchemeColor? navigationRailBackgroundSchemeColor
final

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

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

If undefined, defaults to SchemeColor.background.

If useFlutterDefaults true, and this property is undefined, the effective background color will be ColorScheme.surface.

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? navigationRailBackgroundSchemeColor;