LitTabView class

A screen widget allowing to navigate the provided tab widgets inside an surrounding tab view.

It implements the LitBottomNavigation as a view layer and the required logic for tracking the state and the for navigating between the tabs. The tab wiew will ignore the any overlapping widgets when using a keyboard by disabling the Scaffold.resizeToAvoidBottomInset. To reenable the resize when using a keyboard, set the resizeToAvoidBottomInset to true.

Accoring to Material Design's guidelines (https://material.io/components/), bottom app bars should be able to overlap when using the keyboard.

Inheritance

Constructors

LitTabView({Key? key, required List<LitNavigableTab> tabs, bool resizeToAvoidBottomInset = false, bool hideNavigationBar = false, Duration animationDuration = LitBottomNavigationBarDefaultStyling.animationDuration, double barBlurRadius = LitBottomNavigationBarDefaultStyling.blurRadius, Color barBackgroundColor = LitBottomNavigationBarDefaultStyling.backgroundColor, Color tabItemBackgroundColor = LitBottomNavigationBarDefaultStyling.tabItemBackgroundColor, Color tabItemBackgroundColorSelected = LitBottomNavigationBarDefaultStyling.tabItemBackgroundColorSelected, Color tabItemColor = LitBottomNavigationBarDefaultStyling.tabItemColor, Color tabItemColorSelected = LitBottomNavigationBarDefaultStyling.tabItemColorSelected, int initialTabIndex = 0, void transitionListener(int index)?})
Creates a LitTabView.
const

Properties

animationDuration Duration
States how long each animation cycle should last.
final
barBackgroundColor Color
The navigation bar's background color.
final
barBlurRadius double
States the amount of blur applied to the navigation bar's background.
final
hashCode int
The hash code for this object.
no setterinherited
hideNavigationBar bool
States whether to hide the navigation bar, if any widget should occupy its space temporarily (e.g. when expanding a panel).
final
initialTabIndex int
The initial tab index (defaults to 0)
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
resizeToAvoidBottomInset bool
States whether to resize the tab view widgets when using a keyboard.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
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<LitNavigableTab>
The tabs the tab view should display.
final
transitionListener → (void Function(int index)?)
Called whenever the tab has been transitioned.
final

Methods

createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() → _LitTabViewState
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