CallbackAction class

An Action that takes a callback in order to configure it without having to subclass it.

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

Constructors

CallbackAction(LocalKey intentKey, { @required OnInvokeCallback onInvoke })
A const constructor for an Action. [...]
const

Properties

onInvoke OnInvokeCallback
The callback to be called when invoked. [...]
@protected, final
hashCode int
The hash code for this object. [...]
read-only, inherited
intentKey LocalKey
The unique key for this action. [...]
final, inherited
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited

Methods

invoke(FocusNode node, covariant Intent tag) → void
Called when the action is to be performed. [...]
override
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node. [...]
inherited
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