performActionAt method

void performActionAt(
  1. Offset position,
  2. SemanticsAction action, [
  3. Object? args
])

Asks the SemanticsNode at the given position 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 performActionAt(Offset position, SemanticsAction action, [ Object? args ]) {
  final SemanticsNode? node = rootSemanticsNode;
  if (node == null) {
    return;
  }
  final SemanticsActionHandler? handler = _getSemanticsActionHandlerForPosition(node, position, action);
  if (handler != null) {
    handler(args);
  }
}