OudsNavigationBarItem class
An OUDS navigation bar item.
An OudsNavigationBarItem represents a single destination displayed in an OUDS bottom navigation component (e.g. OudsNavigationBar on Material, or OudsTabBar on iOS).
Each item consists of an icon, a label, and optionally a badge.
Visual appearance can vary depending on selection and the resolved
OudsNavigationBarControlState (enabled/hovered/pressed/focused).
Parameters:
- icon: Asset path of the SVG icon to display.
- label: Text label of the item.
- badge: Optional OudsNavigationBarItemBadge displayed over the icon.
Example usage:
OudsNavigationBarItem(
icon: 'assets/home.svg',
label: 'Home',
);
With a badge:
OudsNavigationBarItem(
icon: 'assets/home.svg',
label: 'Home',
badge: OudsNavigationBarItemBadge(
contentDescription: 'Notifications',
count: 3,
),
);
Constructors
-
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
- Creates a BottomNavigationBarItem for this OudsNavigationBarItem.
- 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