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.
Inheritance
Implementers

Constructors

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

Properties

intentKey LocalKey
The unique key for this action. [...]
final
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

Methods

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

Operators

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