CNTabBarItem class

Immutable data describing a single tab bar item.

Constructors

CNTabBarItem({String? label, CNSymbol? icon, CNSymbol? activeIcon, String? badge, IconData? customIcon, IconData? activeCustomIcon, CNImageAsset? imageAsset, CNImageAsset? activeImageAsset})
Creates a tab bar item description.
const

Properties

activeCustomIcon IconData?
Optional custom icon for selected state. If not provided, customIcon is used for both states.
final
activeIcon CNSymbol?
Optional SF Symbol for the item when selected. If not provided, icon is used for both states.
final
activeImageAsset CNImageAsset?
Optional image asset for selected state. If not provided, imageAsset is used for both states.
final
badge String?
Optional badge text to display on the tab bar item. On iOS, this displays as a red badge with the text. On macOS, badges are not supported by NSSegmentedControl.
final
customIcon IconData?
Optional custom icon for unselected state. Use icons from CupertinoIcons, Icons, or any custom IconData. The icon will be rendered to an image at 25pt (iOS standard tab bar icon size) and sent to the native platform. If provided, this takes precedence over icon.
final
hashCode int
The hash code for this object.
no setterinherited
icon CNSymbol?
Optional SF Symbol for the item (unselected state). If both icon and customIcon are provided, customIcon takes precedence.
final
imageAsset CNImageAsset?
Optional image asset for unselected state. If provided, this takes precedence over icon and customIcon. Priority: imageAsset > customIcon > icon
final
label String?
Optional tab item label.
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
toString() String
A string representation of this object.
inherited

Operators

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