CNTabBarItem class
Immutable data describing a single tab bar item.
Provide at least a label or an icon (or both). Use CNIcon to supply any icon source — SF Symbols, xcasset catalog entries, Flutter asset paths, or raw bytes (PNG/JPG/SVG):
CNTabBarItem(label: 'Home', icon: CNIcon.symbol('house.fill'))
CNTabBarItem(label: 'Inbox', icon: CNIcon.asset('assets/inbox.svg'))
CNTabBarItem(label: 'Photos', icon: CNIcon.xcasset('TabPhotos'))
Constructors
Properties
- activeIcon → CNIcon?
-
Icon for the selected state.
Falls back to icon when not provided.
final
- badge → String?
-
Optional badge to display on the tab bar item.
Use
nullfor no badge, CNTabBarItem.badgeDot (empty string) for a dot-only indicator, or a non-empty string for badge text (e.g. a count). On iOS, this displays as a red badge; on macOS, badges are not supported.final - badgeColor → Color?
-
Optional badge background color for this item.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- icon → CNIcon?
-
Icon for the unselected state.
final
- label → String?
-
Optional tab item label.
final
-
props
→ List<
Object?> -
The list of properties that will be used to determine whether
two instances are equal.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- stringify → bool?
-
If set to
true, thetoStringmethod will be overridden to output this instance'sprops.no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited