CarpenterActionDescriptor class final

Immutable application action metadata used by Carpenter surfaces to project consistent label, icon, availability, semantics, shortcut, and invocation.

Annotations

Constructors

CarpenterActionDescriptor({required String id, required String label, required VoidCallback? onInvoke, CarpenterIconSource? icon, String? semanticLabel, ActionColorRole colorRole = ActionColorRole.neutral, ShortcutActivator? shortcut, bool visible = true, String? disabledReason})
Creates an action descriptor. A null onInvoke makes the action unavailable while preserving its identity and presentation metadata.
const

Properties

colorRole ActionColorRole
Semantic action color family. It does not choose prominence or placement.
final
disabledReason String?
Optional application reason for an unavailable action.
final
effectiveSemanticLabel String
Accessible action name, falling back to the visible label.
no setter
hashCode int
The hash code for this object.
no setterinherited
icon CarpenterIconSource?
Optional icon rendered by surfaces that support action icons.
final
id String
Stable application-defined action identity.
final
isEnabled bool
Whether the descriptor currently has an invocation callback.
no setter
label String
Visible human-readable action label.
final
onInvoke VoidCallback?
Synchronous invocation callback; null means the action is unavailable.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
semanticLabel String?
Optional accessible action name when label is not the correct semantic name.
final
shortcut ShortcutActivator?
Optional keyboard shortcut metadata for surfaces that choose to expose or bind it.
final
visible bool
Logical visibility independent of how a surface presents this action.
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