tap method

void tap(
  1. double x,
  2. double y
)

A tap at (x, y) in the view's logical pixels, on the next frame: a finger down and up again, a new one each time. Throws a StateError while the input has no view size.

Implementation

void tap(double x, double y) {
  _sized('tap');
  final id = _fingers[this] = (_fingers[this] ?? 1 << 20) + 1;
  input.simulate
    ..fingerDown(id, x, y)
    ..fingerUp(id, x, y);
}