LitBottomNavigation class

A bottom navigation bar allowing to switch between a list of tabs, which are displayed on the parent component.

The parent should hold a list of navigatable screen widgets. The parent's selectedTabIndex state value should determine which of the screen widgets should be displayed at the moment. Only one widgets will be displayed at once by displaying the list item whose index value matches with the current selectedTabIndex.

Inheritance

Constructors

LitBottomNavigation({Key? key, bool hide = true, required int selectedTabIndex, required void onTabSelect(int), double landscapeWidthFactor = 0.65, required List<LitBottomNavigationTabData> tabs, EdgeInsets padding = LitBottomNavigationBarDefaultStyling.padding, double height = LitBottomNavigationBarDefaultStyling.height, Duration animationDuration = LitBottomNavigationBarDefaultStyling.animationDuration, double blurRadius = LitBottomNavigationBarDefaultStyling.blurRadius, Color backgroundColor = LitBottomNavigationBarDefaultStyling.backgroundColor, Color tabItemBackgroundColorSelected = LitBottomNavigationBarDefaultStyling.tabItemBackgroundColorSelected, Color tabItemBackgroundColor = LitBottomNavigationBarDefaultStyling.tabItemBackgroundColor, Color tabItemColor = LitBottomNavigationBarDefaultStyling.tabItemColor, Color tabItemColorSelected = LitBottomNavigationBarDefaultStyling.tabItemColorSelected})
Creates a LitBottomNavigation.
const

Properties

animationDuration Duration
States how long each animation cycle should last.
final
backgroundColor Color
The navigation bar's background color.
final
blurRadius double
States the amount of blur applied to the navigation bar's background.
final
hashCode int
The hash code for this object.
no setterinherited
height double
The navigation bar's total height.
final
hide bool
States whether to hide the bottom navigation.
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
landscapeWidthFactor double
The relative width the bar the landscape mode.
final
onTabSelect → void Function(int)
The setter method to set the new tab index value on the parent widget.
final
padding EdgeInsets
The padding surrounding the navigation bar.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
selectedTabIndex int
The currently displayed widget's index value.
final
tabItemBackgroundColor Color
The background color of each unselected tab item.
final
tabItemBackgroundColorSelected Color
The background color of the currently selected tab item.
final
tabItemColor Color
The color of the currently selected tab item.
final
tabItemColorSelected Color
The color of each unselected tab item.
final
tabs List<LitBottomNavigationTabData>
The meta data of the navigatable tabs. These will have to match with the parent's widget list in order to avoid index-based errors.
final

Methods

createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() → _LitBottomNavigationState
Creates the mutable state for this widget at a given location in the tree.
override
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