CNTabBarItem class
Immutable data describing a single tab bar item.
Constructors
-
CNTabBarItem({String? label, CNSymbol? icon, ImageProvider<
Object> ? image, double? imageSize, dynamic badgeValue, Color? badgeColor, double? labelSize, double? iconSize}) -
Creates a tab bar item description.
const
Properties
- badgeColor → Color?
-
Optional custom badge background color.
If null, uses the system default red color for badges.
final
- badgeValue → dynamic
-
Badge value to display on the tab.
final
- formattedBadgeValue → String?
-
Formats a badge value for display.
Numbers over 99 are shown as "99+".
Strings are returned as-is.
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- icon → CNSymbol?
-
Optional SF Symbol for the item.
final
- iconSize → double?
-
Size for the icon in points.
If null, uses the icon's intrinsic size or platform default.
This overrides the size specified in the CNSymbol.
final
-
image
→ ImageProvider<
Object> ? -
Optional custom image provider for the item.
Cannot be used together with icon.
final
- imageSize → double?
-
Size for the custom image in points. Only applies when image is used.
If not specified, the image will use its intrinsic size or be scaled to fit.
final
- label → String?
-
Optional tab item label.
final
- labelSize → double?
-
Font size for the label text in points.
If null, uses the platform default size.
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