Action class

Base class for actions.

As the name implies, an Action is an action or command to be performed. They are typically invoked as a result of a user action, such as a keyboard shortcut in a Shortcuts widget, which is used to look up an Intent, which is given to an ActionDispatcher to map the Intent to an Action and invoke it.

The ActionDispatcher can invoke an Action on the primary focus, or without regard for focus.

See also:

  • Shortcuts, which is a widget that contains a key map, in which it looks up key combinations in order to invoke actions.
  • Actions, which is a widget that defines a map of Intent to Action and allows redefining of actions for its descendants.
  • ActionDispatcher, a class that takes an Action and invokes it using a FocusNode for context.


Action(LocalKey intentKey)
A const constructor for an Action. [...]


intentKey LocalKey
The unique key for this action. [...]
hashCode int
The hash code for this object. [...]
read-only, inherited
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited


debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node. [...]
invoke(FocusNode node, covariant Intent intent) → void
Called when the action is to be performed. [...]
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
toDiagnosticsNode({String name, DiagnosticsTreeStyle style}) DiagnosticsNode
Returns a debug representation of the object that is used by debugging tools and by DiagnosticsNode.toStringDeep.
toString({DiagnosticLevel minLevel: DiagnosticLevel.debug}) String
Returns a string representation of this object.
toStringShort() String
A brief description of this object, usually just the runtimeType and the hashCode.


operator ==(dynamic other) bool
The equality operator. [...]