BottomNavigationBarThemeData class

Defines default property values for descendant BottomNavigationBar widgets.

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

Typically a BottomNavigationBarThemeData is specified as part of the overall Theme with ThemeData.bottomNavigationBarTheme.

All BottomNavigationBarThemeData properties are null by default. When null, the BottomNavigationBar's build method provides defaults.

See also:

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

Constructors

BottomNavigationBarThemeData({Color? backgroundColor, double? elevation, IconThemeData? selectedIconTheme, IconThemeData? unselectedIconTheme, Color? selectedItemColor, Color? unselectedItemColor, TextStyle? selectedLabelStyle, TextStyle? unselectedLabelStyle, bool? showSelectedLabels, bool? showUnselectedLabels, BottomNavigationBarType? type, bool? enableFeedback, BottomNavigationBarLandscapeLayout? landscapeLayout, MaterialStateProperty<MouseCursor?>? mouseCursor})
Creates a theme that can be used for ThemeData.bottomNavigationBarTheme.
const

Properties

backgroundColor Color?
The color of the BottomNavigationBar itself.
final
elevation double?
The z-coordinate of the BottomNavigationBar.
final
enableFeedback bool?
If specified, defines the feedback property for BottomNavigationBar.
final
hashCode int
The hash code for this object.
no setteroverride
landscapeLayout BottomNavigationBarLandscapeLayout?
If non-null, overrides the BottomNavigationBar.landscapeLayout property.
final
mouseCursor MaterialStateProperty<MouseCursor?>?
If specified, overrides the default value of BottomNavigationBar.mouseCursor.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
selectedIconTheme IconThemeData?
The size, opacity, and color of the icon in the currently selected BottomNavigationBarItem.icon.
final
selectedItemColor Color?
The color of the selected BottomNavigationBarItem.icon and BottomNavigationBarItem.label.
final
selectedLabelStyle TextStyle?
The TextStyle of the BottomNavigationBarItem labels when they are selected.
final
showSelectedLabels bool?
Whether the labels are shown for the selected BottomNavigationBarItem.
final
showUnselectedLabels bool?
Whether the labels are shown for the unselected BottomNavigationBarItems.
final
type BottomNavigationBarType?
Defines the layout and behavior of a BottomNavigationBar.
final
unselectedIconTheme IconThemeData?
The size, opacity, and color of the icon in the currently unselected BottomNavigationBarItem.icons.
final
unselectedItemColor Color?
The color of the unselected BottomNavigationBarItem.icon and BottomNavigationBarItem.labels.
final
unselectedLabelStyle TextStyle?
The TextStyle of the BottomNavigationBarItem labels when they are not selected.
final

Methods

copyWith({Color? backgroundColor, double? elevation, IconThemeData? selectedIconTheme, IconThemeData? unselectedIconTheme, Color? selectedItemColor, Color? unselectedItemColor, TextStyle? selectedLabelStyle, TextStyle? unselectedLabelStyle, bool? showSelectedLabels, bool? showUnselectedLabels, BottomNavigationBarType? type, bool? enableFeedback, BottomNavigationBarLandscapeLayout? landscapeLayout, MaterialStateProperty<MouseCursor?>? mouseCursor}) BottomNavigationBarThemeData
Creates a copy of this object but 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(BottomNavigationBarThemeData? a, BottomNavigationBarThemeData? b, double t) BottomNavigationBarThemeData
Linearly interpolate between two BottomNavigationBarThemeData.