CustomSemanticsAction class
An identifier of a custom semantics action.
Custom semantics actions can be provided to make complex user interactions more accessible. For instance, if an application has a drag-and-drop list that requires the user to press and hold an item to move it, users interacting with the application using a hardware switch may have difficulty. This can be made accessible by creating custom actions and pairing them with handlers that move a list item up or down in the list.
In Android, these actions are presented in the local context menu. In iOS, these are presented in the radial context menu.
Localization and text direction do not automatically apply to the provided label or hint.
Instances of this class should either be instantiated with const or new instances cached in static fields.
See also:
- SemanticsProperties, where the handler for a custom action is provided.
- Annotations
- @immutable
Constructors
- CustomSemanticsAction({@required String label })
-
Creates a new CustomSemanticsAction. [...]
const
- CustomSemanticsAction.overridingAction({@required String hint, @required SemanticsAction action })
-
Creates a new CustomSemanticsAction that overrides a standard semantics
action. [...]
const
Properties
- action → SemanticsAction
-
The standard semantics action this action replaces.
final
- hashCode → int
-
The hash code for this object. [...]
read-only, override
- hint → String
-
The hint description of this custom semantics action.
final
- label → String
-
The user readable name of this custom semantics action.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
read-only, inherited
Methods
-
toString(
) → String -
Returns a string representation of this object.
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a non-existent method or property is accessed. [...]
inherited
Operators
-
operator ==(
dynamic other) → bool -
The equality operator. [...]
override
Static Methods
-
getAction(
int id) → CustomSemanticsAction -
Get the
action
for a given identifier. -
getIdentifier(
CustomSemanticsAction action) → int -
Get the identifier for a given
action
.