OudsNavigationBarItem class

A single destination in an OUDS bottom navigation component.

Used by OudsNavigationBar (Material/Android) and OudsTabBar (iOS). Each item has an icon, a label, and an optional badge. Visual appearance adapts to the OudsNavigationBarControlState (enabled/hovered/pressed/focused).

OudsNavigationBarItem(icon: 'assets/home.svg', label: 'Home');

// With badge:
OudsNavigationBarItem(
  icon: 'assets/home.svg',
  label: 'Home',
  badge: OudsNavigationBarItemBadge(contentDescription: 'Notifications', count: 3),
);

Constructors

OudsNavigationBarItem({required String icon, required String label, OudsNavigationBarItemBadge? badge})
Creates a navigation bar item with an icon, a label, and an optional badge.
const

Properties

badge → OudsNavigationBarItemBadge?
Optional badge displayed over the icon.
final
hashCode → int
The hash code for this object.
no setterinherited
icon → String
Path to the SVG icon asset.
final
label → String
Text label of the navigation item.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toBottomNavigationBarItem(BuildContext context, OudsNavigationBarControlState controlState, {required bool isSelected, required int index, AnimationController? externalController}) → BottomNavigationBarItem
Creates a BottomNavigationBarItem for this OudsNavigationBarItem.
toNavigationDestination(BuildContext context, OudsNavigationBarControlState controlState, {required bool isSelected, required int index, required int total, VoidCallback? onTap}) → Column
Creates the destination widget tree for this OudsNavigationBarItem.
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited