CNActionSheetAction<T> class
A single choice in a CNActionSheet.
T is the type CNActionSheet.show returns when this action is selected.
Icons are intentionally absent
UIAlertAction exposes no public image property, so an icon field here
could never render on the native path. The setValue(_:forKey: "image")
workaround seen in the wild is KVC against an undeclared private property —
it risks App Store rejection and breaks silently across iOS releases. Use
CNPopupMenuButton when you need icons; its UIMenu path has a public
image API.
- Annotations
Constructors
- CNActionSheetAction({required String label, T? value, bool isDestructive = false, bool enabled = true})
-
Creates an action sheet choice.
const
Properties
- enabled → bool
-
Whether the action can be selected. A disabled action renders greyed out
and ignores taps.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- isDestructive → bool
-
Marks the action as destructive (e.g. "Delete", "Log out").
final
- label → String
-
The text shown on the button.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- value → T?
-
Returned by CNActionSheet.show when this action is selected.
final
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