scroll method

Future<void> scroll (SerializableFinder finder, double dx, double dy, Duration duration, { int frequency: 60, Duration timeout })

Tell the driver to perform a scrolling action.

A scrolling action begins with a "pointer down" event, which commonly maps to finger press on the touch screen or mouse button press. A series of "pointer move" events follow. The action is completed by a "pointer up" event.

dx and dy specify the total offset for the entire scrolling action.

duration specifies the length of the action.

The move events are generated at a given frequency in Hz (or events per second). It defaults to 60Hz.

Implementation

Future<void> scroll(SerializableFinder finder, double dx, double dy, Duration duration, { int frequency = 60, Duration timeout }) async {
  timeout ??= _shortTimeout(timeoutMultiplier);
  await _sendCommand(Scroll(finder, dx, dy, duration, frequency, timeout: timeout));
}