NavigationBarThemeData class

Defines default property values for descendant NavigationBar widgets.

Descendant widgets obtain the current NavigationBarThemeData object using NavigationBarTheme.of(context). Instances of NavigationBarThemeData can be customized with NavigationBarThemeData.copyWith.

Typically a NavigationBarThemeData is specified as part of the overall Theme with ThemeData.navigationBarTheme. Alternatively, a NavigationBarTheme inherited widget can be used to theme NavigationBars in a subtree of widgets.

All NavigationBarThemeData properties are null by default. When null, the NavigationBar will provide its own defaults based on the overall Theme's textTheme and colorScheme. See the individual NavigationBar properties for details.

See also:

  • ThemeData, which describes the overall theme information for the application.
Mixed in types
Annotations

Constructors

Creates a theme that can be used for ThemeData.navigationBarTheme and NavigationBarTheme.
const

Properties

backgroundColor Color?
Overrides the default value of NavigationBar.backgroundColor.
final
elevation double?
Overrides the default value of NavigationBar.elevation.
final
hashCode int
The hash code for this object.
no setteroverride
height double?
Overrides the default value of NavigationBar.height.
final
iconTheme MaterialStateProperty<IconThemeData?>?
The theme to merge with the default icon theme for NavigationDestination icons.
final
indicatorColor Color?
Overrides the default value of NavigationBar's selection indicator.
final
indicatorShape ShapeBorder?
Overrides the default shape of the NavigationBar's selection indicator.
final
labelBehavior NavigationDestinationLabelBehavior?
Overrides the default value of NavigationBar.labelBehavior.
final
labelTextStyle MaterialStateProperty<TextStyle?>?
The style to merge with the default text style for NavigationDestination labels.
final
overlayColor MaterialStateProperty<Color?>?
Overrides the default value of NavigationBar.overlayColor.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
shadowColor Color?
Overrides the default value of NavigationBar.shadowColor.
final
surfaceTintColor Color?
Overrides the default value of NavigationBar.surfaceTintColor.
final

Methods

copyWith({double? height, Color? backgroundColor, double? elevation, Color? shadowColor, Color? surfaceTintColor, Color? indicatorColor, ShapeBorder? indicatorShape, MaterialStateProperty<TextStyle?>? labelTextStyle, MaterialStateProperty<IconThemeData?>? iconTheme, NavigationDestinationLabelBehavior? labelBehavior, MaterialStateProperty<Color?>? overlayColor}) NavigationBarThemeData
Creates a copy of this object with the given fields replaced with the new values.
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toDiagnosticsNode({String? name, DiagnosticsTreeStyle? style}) DiagnosticsNode
Returns a debug representation of the object that is used by debugging tools and by DiagnosticsNode.toStringDeep.
inherited
toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) String
A string representation of this object.
inherited
toStringShort() String
A brief description of this object, usually just the runtimeType and the hashCode.
inherited

Operators

operator ==(Object other) bool
The equality operator.
override

Static Methods

lerp(NavigationBarThemeData? a, NavigationBarThemeData? b, double t) NavigationBarThemeData?
Linearly interpolate between two navigation rail themes.