BaseNavigationBarAction class
Cross-platform navigation bar action
Represents an action button in the navigation bar with icon and/or label. Also supports spacing actions for layout control.
Automatically converts to platform-specific formats:
- iOS: Uses CNNavigationBarAction with SF Symbols
- Material: Uses IconButton/TextButton with Material icons
Constructors
-
const
-
Creates a fixed space action
factory
-
Creates a flexible space action
factory
-
Creates a navigation bar action with a popup menu
factory
-
Creates a navigation bar action with a CNPopupMenuButton
factory
-
Creates an action with a custom image asset.
factory
Properties
- badgeColor → Color?
-
Badge background color (iOS only)
final
- badgeValue → String?
-
Badge value to display on the action (iOS only)
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- icon → CNSymbol?
-
Icon for the action (CNSymbol on iOS, Material icon elsewhere)
final
- iconSize → double?
-
Icon size (iOS only)
final
- isFixedSpace → bool
-
Check if this is a fixed space action
no setter
- isFlexibleSpace → bool
-
Check if this is a flexible space action
no setter
- isImageAction → bool
-
Check if this is a custom image action
no setter
- label → String?
-
Optional text label
final
- labelSize → double?
-
Label text size (iOS only)
final
-
onPopupMenuSelected
→ ValueChanged<
int> ? -
Called when a popup menu item is selected
final
- onPressed → VoidCallback?
-
Callback when action is pressed
final
- padding → double?
-
Padding around the action (iOS only)
final
-
popupMenuItems
→ List<
BasePopupMenuItem> ? -
Popup menu items to display when the action is pressed
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- spaceWidth → double?
-
Get the space width (for fixed space actions)
no setter
- tint → Color?
-
Custom tint color for the action
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
- Convert to CNNavigationBarAction for iOS implementation
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited