performAction method Null safety
- int id,
- SemanticsAction action,
- [Object? args]
Asks the SemanticsNode with the given id to perform the given action.
If the SemanticsNode has not indicated that it can perform the action, this function does nothing.
If the given action
requires arguments they need to be passed in via
the args
parameter.
Implementation
void performAction(int id, SemanticsAction action, [ Object? args ]) {
assert(action != null);
final SemanticsActionHandler? handler = _getSemanticsActionHandlerForId(id, action);
if (handler != null) {
handler(args);
return;
}
// Default actions if no [handler] was provided.
if (action == SemanticsAction.showOnScreen && _nodes[id]!._showOnScreen != null) {
_nodes[id]!._showOnScreen!();
}
}