Actions class

A widget that establishes an ActionDispatcher and a map of Intent to Action to be used by its descendants when invoking an Action.

Actions are typically invoked using Actions.invoke with the context containing the ambient Actions widget.

See also:

  • ActionDispatcher, the object that this widget uses to manage actions.
  • Action, a class for containing and defining an invocation of a user action.
  • Intent, a class that holds a unique LocalKey identifying an action, as well as configuration information for running the Action.
  • Shortcuts, a widget used to bind key combinations to Intents.
Inheritance

Constructors

Actions({Key key, ActionDispatcher dispatcher: const ActionDispatcher(), @required Map<LocalKey, ActionFactory> actions, @required Widget child })
Creates an Actions widget. [...]
const

Properties

actions Map<LocalKey, ActionFactory>
A map of Intent keys to ActionFactory factory methods that defines which actions this widget knows about.
final
dispatcher ActionDispatcher
The ActionDispatcher object that invokes actions. [...]
final
child Widget
The widget below this widget in the tree. [...]
final, inherited
hashCode int
The hash code for this object. [...]
read-only, inherited
key Key
Controls how one widget replaces another widget in the tree. [...]
final, 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
updateShouldNotify(covariant Actions oldWidget) bool
Whether the framework should notify widgets that inherit from this widget. [...]
override
createElement() InheritedElement
Inflates this configuration to a concrete instance. [...]
inherited
debugDescribeChildren() List<DiagnosticsNode>
Returns a list of DiagnosticsNode objects describing this node's children. [...]
@protected, 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
toStringDeep({String prefixLineOne: '', String prefixOtherLines, DiagnosticLevel minLevel: DiagnosticLevel.debug }) String
Returns a string representation of this node and its descendants. [...]
inherited
toStringShallow({String joiner: ', ', DiagnosticLevel minLevel: DiagnosticLevel.debug }) String
Returns a one-line detailed description of the object. [...]
inherited
toStringShort() String
A short, textual description of this widget.
inherited

Operators

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

Static Methods

invoke(BuildContext context, Intent intent, { FocusNode focusNode, bool nullOk: false }) bool
Invokes the action associated with the given Intent using the Actions widget that most tightly encloses the given BuildContext. [...]
of(BuildContext context, { bool nullOk: false }) ActionDispatcher
Returns the ActionDispatcher associated with the Actions widget that most tightly encloses the given BuildContext. [...]