CNPopupMenuItem class

A selectable item in a popup menu.

Inheritance

Constructors

CNPopupMenuItem({required String label, CNSymbol? icon, IconData? customIcon, CNImageAsset? imageAsset, Color? iconColor, bool enabled = true, bool checked = false, bool isDestructive = false})
Creates a selectable popup menu item.
const

Properties

checked → bool
Whether the item shows a checkmark (selected/active state).
final
customIcon → IconData?
Optional custom icon from CupertinoIcons, Icons, or any IconData. If provided, this takes precedence over icon but not imageAsset.
final
enabled → bool
Whether the item can be selected.
final
hashCode → int
The hash code for this object.
no setterinherited
icon → CNSymbol?
Optional SF Symbol shown before the label. Priority: imageAsset > customIcon > icon
final
iconColor → Color?
Optional color for custom icons. This applies a tint color to the custom icon. For SF Symbols, use the icon's color parameter instead.
final
imageAsset → CNImageAsset?
Optional image asset (SVG, PNG, etc.) shown before the label. If provided, this takes precedence over icon and customIcon.
final
isDestructive → bool
Marks the item as destructive (e.g. "Delete", "Logout", "Remove").
final
label → String
Display label for the item.
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