NodeAction class

Defines a single actionable item in a context menu.

  • id: Unique identifier for logic checks.
  • label: Human-readable text.
  • onInvoke: Callback executed when the user selects this action.

Constructors

NodeAction({required String id, required String label, Widget? icon, Future<void> onInvoke(VisibleNode node)?})
Creates a menu action.
const

Properties

hashCode → int
The hash code for this object.
no setterinherited
icon → Widget?
Optional leading icon for the menu item.
final
id → String
Unique ID for this action (e.g. 'delete', 'rename').
final
label → String
The text displayed in the menu item.
final
onInvoke → Future<void> Function(VisibleNode node)?
Callback to execute when the action is chosen.
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