synthesizeScrollGesture

suspend fun synthesizeScrollGesture(args: Input.SynthesizeScrollGestureParameter, mode: CommandMode = CommandMode.DEFAULT)

Synthesizes a scroll gesture over a time period by issuing appropriate touch events.


suspend fun synthesizeScrollGesture(x: Double, y: Double, xDistance: Double? = null, yDistance: Double? = null, xOverscroll: Double? = null, yOverscroll: Double? = null, preventFling: Boolean? = null, speed: Int? = null, gestureSourceType: Input.GestureSourceType? = null, repeatCount: Int? = null, repeatDelayMs: Int? = null, interactionMarkerName: String? = null)

Synthesizes a scroll gesture over a time period by issuing appropriate touch events.

Parameters

x

X coordinate of the start of the gesture in CSS pixels.

y

Y coordinate of the start of the gesture in CSS pixels.

xDistance

The distance to scroll along the X axis (positive to scroll left).

yDistance

The distance to scroll along the Y axis (positive to scroll up).

xOverscroll

The number of additional pixels to scroll back along the X axis, in addition to the given distance.

yOverscroll

The number of additional pixels to scroll back along the Y axis, in addition to the given distance.

preventFling

Prevent fling (default: true).

speed

Swipe speed in pixels per second (default: 800).

gestureSourceType

Which type of input events to be generated (default: 'default', which queries the platform for the preferred input type).

repeatCount

The number of times to repeat the gesture (default: 0).

repeatDelayMs

The number of milliseconds delay between each repeat. (default: 250).

interactionMarkerName

The name of the interaction markers to generate, if not empty (default: "").