TextEditingAction<T extends Intent> class Null safety

An Action related to editing text.

Enables itself only when a TextEditingActionTarget, e.g. EditableText, is currently focused. The result of this is that when a TextEditingActionTarget is not focused, it will fall through to any non-TextEditingAction that handles the same shortcut. For example, overriding the tab key in Shortcuts with a TextEditingAction will only invoke your TextEditingAction when a TextEditingActionTarget is focused, otherwise the default tab behavior will apply.

The currently focused TextEditingActionTarget is available in the invoke method via textEditingActionTarget.

See also:

  • CallbackAction, which is a similar Action type but unrelated to text editing.




callingAction Action<T>?
The Action overridden by this Action. [...]
@protected, read-only, inherited
hashCode int
The hash code for this object. [...]
read-only, inherited
intentType Type
Gets the type of intent this action responds to.
read-only, inherited
isActionEnabled bool
Whether this Action is inherently enabled. [...]
read-only, inherited
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
textEditingActionTarget TextEditingActionTarget?
Returns the currently focused TextEditingAction, or null if none is focused.
@protected, read-only


addActionListener(ActionListenerCallback listener) → void
Register a callback to listen for changes to the state of this action. [...]
@mustCallSuper, inherited
consumesKey(T intent) bool
Indicates whether this action should treat key events mapped to this action as being "handled" when it is invoked via the key event. [...]
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node. [...]
@mustCallSuper, @protected, inherited
invoke(T intent, [BuildContext? context]) Object?
Called when the action is to be performed. [...]
@protected, inherited
isEnabled(T intent) bool
Returns true if the action is enabled and is ready to be invoked. [...]
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
notifyActionListeners() → void
Call all the registered listeners. [...]
removeActionListener(ActionListenerCallback listener) → void
Remove a previously registered closure from the list of closures that are notified when the object changes. [...]
@mustCallSuper, inherited
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.info}) String
A string representation of this object. [...]
toStringShort() String
A brief description of this object, usually just the runtimeType and the hashCode. [...]


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