tapSequence method

  1. @override
Future<void> tapSequence(
  1. List<({int x, int y})> points, {
  2. required int intervalMs,
})
override

Taps each physical point in order with intervalMs between taps.

Implementation

@override
Future<void> tapSequence(List<({int x, int y})> points, {required int intervalMs}) {
  return _run(
    _BridgeCommand.taps,
    [
      udid,
      '$deviceLogicalWidth',
      '$deviceLogicalHeight',
      '$intervalMs',
      for (final pt in points)
        ...() {
          final p = _logical(pt.x, pt.y);
          return ['${p.x}', '${p.y}'];
        }(),
    ],
    work: Duration(milliseconds: intervalMs * points.length),
  );
}