UiBottomTabScaffold class

Page shell with a UiBottomTabBar and per-tab state preservation.

Uses an IndexedStack so each tab's subtree is built once and kept alive across switches — scroll position, controllers, and StatefulWidget state all survive. Set preserveState: false to tear down off-screen tabs (useful for tabs that pull data on mount).

Inheritance

Constructors

UiBottomTabScaffold({Key? key, required List<UiBottomTabItem> items, required int currentIndex, required ValueChanged<int> onChanged, required List<Widget> pages, bool preserveState = true, Color? tabBarBackgroundColor, UiBottomTabBarLayout tabBarLayout = UiBottomTabBarLayout.floatingDock, double tabBarAdaptiveBreakpoint = 700, double tabBarFloatingMaxWidth = 640, double tabBarFloatingHorizontalMargin = 16, double tabBarFloatingBottomMargin = 12, bool convertToRailOnWideScreens = false, double railBreakpoint = 600, UiBottomTabRailBuilder? railBuilder, List<UiBottomTabItem>? bottomItems, int? bottomCurrentIndex, ValueChanged<int>? onBottomChanged, int maxVisibleBottomItems = 3, String? moreLabel, UiBottomTabOverflowDrawerBuilder? overflowDrawerBuilder, UiBottomTabAccessory? bottomAccessory})
const

Properties

bottomAccessory UiBottomTabAccessory?
final
bottomCurrentIndex int?
final
bottomItems List<UiBottomTabItem>?
Optional phone/tablet bottom-bar item set.
final
convertToRailOnWideScreens bool
When true, wide layouts render railBuilder instead of the bottom bar. Compact Android and iOS devices retain the bottom bar in landscape even when their long edge crosses railBreakpoint.
final
currentIndex int
final
hashCode int
The hash code for this object.
no setterinherited
items List<UiBottomTabItem>
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
maxVisibleBottomItems int
Maximum canonical app destinations shown directly in the bottom bar.
final
moreLabel String?
Label used by the automatic overflow control and default overflow drawer.
final
onBottomChanged ValueChanged<int>?
final
onChanged ValueChanged<int>
final
overflowDrawerBuilder UiBottomTabOverflowDrawerBuilder?
Optional application-owned composition for the automatic More drawer.
final
pages List<Widget>
final
preserveState bool
When true (default), all pages are built once and kept alive in an IndexedStack. When false, only the current page is mounted.
final
railBreakpoint double
final
railBuilder UiBottomTabRailBuilder?
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
tabBarAdaptiveBreakpoint double
final
tabBarBackgroundColor Color?
final
tabBarFloatingBottomMargin double
final
tabBarFloatingHorizontalMargin double
final
tabBarFloatingMaxWidth double
final
tabBarLayout UiBottomTabBarLayout
final

Methods

build(BuildContext context) Widget
Describes the part of the user interface represented by this widget.
override
createElement() StatelessElement
Creates a StatelessElement to manage this widget's 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, int wrapWidth = 65}) 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