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

BaseNavigationBarAction({CNSymbol? icon, String? label, VoidCallback? onPressed, Color? tint, double? padding, double? labelSize = 15, double? iconSize = 16, String? badgeValue, Color? badgeColor})
const
BaseNavigationBarAction.fixedSpace(double width)
Creates a fixed space action
factory
BaseNavigationBarAction.flexibleSpace()
Creates a flexible space action
factory
BaseNavigationBarAction.popupMenu({CNSymbol? icon, String? label, required List<BasePopupMenuItem> popupMenuItems, required ValueChanged<int> onPopupMenuSelected, Color? tint, double? padding, double? labelSize = 15, double? iconSize = 16, String? badgeValue, Color? badgeColor})
Creates a navigation bar action with a popup menu
factory
BaseNavigationBarAction.popupMenuButton({CNSymbol? icon, String? label, required List<BasePopupMenuItem> popupMenuItems, required ValueChanged<int> onPopupMenuSelected, Color? tint, double? padding, double? labelSize = 15, double? iconSize = 16, String? badgeValue, Color? badgeColor})
Creates a navigation bar action with a CNPopupMenuButton
factory
BaseNavigationBarAction.withImage({required String materialImage, String? iosImage, double imageSize = 24.0, double imageWidth = 24.0, double imageHeight = 24.0, String? label, VoidCallback? onPressed, Color? tint, double? padding, double? labelSize, String? badgeValue, Color? badgeColor})
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
toCNNavigationBarAction() → CNNavigationBarAction
Convert to CNNavigationBarAction for iOS implementation
toString() → String
A string representation of this object.
inherited

Operators

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