KeyedBottomNavigationBar<T> class

An equivalent to BottomNavigationBar that uses keys instead of indexes.

Inheritance

Constructors

KeyedBottomNavigationBar({Key? key, required Map<T, BottomNavigationBarItem> items, List<T>? keyOrder, ValueChanged<T>? onTap, required T currentItemKey, double? elevation, BottomNavigationBarType? type, Color? fixedColor, Color? backgroundColor, double iconSize = 24.0, Color? selectedItemColor, Color? unselectedItemColor, IconThemeData? selectedIconTheme, IconThemeData? unselectedIconTheme, double selectedFontSize = 14.0, double unselectedFontSize = 12.0, TextStyle? selectedLabelStyle, TextStyle? unselectedLabelStyle, bool? showSelectedLabels, bool? showUnselectedLabels, MouseCursor? mouseCursor, bool? enableFeedback, BottomNavigationBarLandscapeLayout? landscapeLayout})
Constructs the bar.

Properties

backgroundColor Color?
The color of the BottomNavigationBar itself.
finalinherited
currentIndex int
The index into items for the current active BottomNavigationBarItem.
finalinherited
elevation double?
The z-coordinate of this BottomNavigationBar.
finalinherited
enableFeedback bool?
Whether detected gestures should provide acoustic and/or haptic feedback.
finalinherited
fixedColor Color?
The value of selectedItemColor.
no setterinherited
hashCode int
The hash code for this object.
no setterinherited
iconSize double
The size of all of the BottomNavigationBarItem icons.
finalinherited
items List<BottomNavigationBarItem>
Defines the appearance of the button items that are arrayed within the bottom navigation bar.
finalinherited
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
landscapeLayout BottomNavigationBarLandscapeLayout?
The arrangement of the bar's items when the enclosing MediaQueryData.orientation is Orientation.landscape.
finalinherited
mouseCursor MouseCursor?
The cursor for a mouse pointer when it enters or is hovering over the items.
finalinherited
onTap ValueChanged<int>?
Called when one of the items is tapped.
finalinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
selectedFontSize double
The font size of the BottomNavigationBarItem labels when they are selected.
finalinherited
selectedIconTheme IconThemeData?
The size, opacity, and color of the icon in the currently selected BottomNavigationBarItem.icon.
finalinherited
selectedItemColor Color?
The color of the selected BottomNavigationBarItem.icon and BottomNavigationBarItem.label.
finalinherited
selectedLabelStyle TextStyle?
The TextStyle of the BottomNavigationBarItem labels when they are selected.
finalinherited
showSelectedLabels bool?
Whether the labels are shown for the selected BottomNavigationBarItem.
finalinherited
showUnselectedLabels bool?
Whether the labels are shown for the unselected BottomNavigationBarItems.
finalinherited
type BottomNavigationBarType?
Defines the layout and behavior of a BottomNavigationBar.
finalinherited
unselectedFontSize double
The font size of the BottomNavigationBarItem labels when they are not selected.
finalinherited
unselectedIconTheme IconThemeData?
The size, opacity, and color of the icon in the currently unselected BottomNavigationBarItem.icons.
finalinherited
unselectedItemColor Color?
The color of the unselected BottomNavigationBarItem.icon and BottomNavigationBarItem.labels.
finalinherited
unselectedLabelStyle TextStyle?
The TextStyle of the BottomNavigationBarItem labels when they are not selected.
finalinherited
useLegacyColorScheme bool
This flag is controlling how BottomNavigationBar is going to use the colors provided by the selectedIconTheme, unselectedIconTheme, selectedItemColor, unselectedItemColor. The default value is true as the new theming logic is a breaking change. To opt-in the new theming logic set the flag to false
finalinherited

Methods

createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() State<BottomNavigationBar>
Creates the mutable state for this widget at a given location in the tree.
inherited
debugDescribeChildren() List<DiagnosticsNode>
Returns a list of DiagnosticsNode objects describing this node's children.
inherited
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node.
inherited
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
toStringDeep({String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug}) String
Returns a string representation of this node and its descendants.
inherited
toStringShallow({String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) String
Returns a one-line detailed description of the object.
inherited
toStringShort() String
A short, textual description of this widget.
inherited

Operators

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