AuiBottomNav class

A custom bottom navigation bar with optional indicator pill, badges, and full color customisation.

Requires between 2 and 5 items.

AuiBottomNav(
  items: const [
    AuiBottomNavItem(icon: Icons.home, label: 'Home'),
    AuiBottomNavItem(icon: Icons.search, label: 'Search'),
  ],
  currentIndex: _index,
  onTap: (i) => setState(() => _index = i),
)
Inheritance

Constructors

AuiBottomNav({Key? key, required List<AuiBottomNavItem> items, required int currentIndex, required ValueChanged<int> onTap, Color? activeColor, Color? inactiveColor, Color? backgroundColor, double elevation = 8.0, bool showLabels = true, Color? indicatorColor})
Creates an AuiBottomNav.
const

Properties

activeColor Color?
Color used for the active item icon and label. Defaults to the theme's primary color.
final
backgroundColor Color?
Background color of the navigation bar. Defaults to the theme's canvas color.
final
currentIndex int
The index of the currently active item.
final
elevation double
Elevation (shadow depth) of the navigation bar.
final
hashCode int
The hash code for this object.
no setterinherited
inactiveColor Color?
Color used for inactive item icons and labels. Defaults to Colors.grey.
final
indicatorColor Color?
Background color of the pill indicator drawn behind the active icon. When null, no pill is shown.
final
items List<AuiBottomNavItem>
The navigation items to display. Must contain between 2 and 5 items.
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
onTap ValueChanged<int>
Called when the user taps an item.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
showLabels bool
Whether to show labels below icons.
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