AuiTabBar class

A horizontal tab bar that supports underline and pill indicator styles.

Example usage:

AuiTabBar(
  tabs: const [AuiTab(label: 'Home'), AuiTab(label: 'Profile')],
  currentIndex: _index,
  onTap: (i) => setState(() => _index = i),
)
Inheritance

Constructors

AuiTabBar({Key? key, required List<AuiTab> tabs, required int currentIndex, required ValueChanged<int> onTap, TabIndicatorStyle indicatorStyle = TabIndicatorStyle.underline, Color? activeColor, Color? inactiveColor, Color? backgroundColor, bool isScrollable = false, double tabHeight = 44.0})
Creates an AuiTabBar.
const

Properties

activeColor → Color?
Color used for the active tab indicator and active label. Falls back to ColorScheme.primary when not provided.
final
backgroundColor → Color?
Background color of the entire tab bar. Falls back to ColorScheme.surface when not provided.
final
currentIndex → int
The index of the currently selected tab.
final
hashCode → int
The hash code for this object.
no setterinherited
inactiveColor → Color?
Color used for inactive tab labels. Falls back to ColorScheme.onSurface.withValues(alpha:0.6) when not provided.
final
indicatorStyle → TabIndicatorStyle
Visual style for the active-tab indicator. Defaults to TabIndicatorStyle.underline.
final
isScrollable → bool
When true, the tab bar scrolls horizontally instead of stretching tabs to fill the available width.
final
key → Key?
Controls how one widget replaces another widget in the tree.
finalinherited
onTap → ValueChanged<int>
Called when the user taps a tab.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
tabHeight → double
Height of each tab item. Defaults to 44.0.
final
tabs → List<AuiTab>
The list of tabs to display.
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