synthesizePinchGesture method

Future<void> synthesizePinchGesture(
  1. num x,
  2. num y,
  3. num scaleFactor, {
  4. int? relativeSpeed,
  5. GestureSourceType? gestureSourceType,
})

Synthesizes a pinch gesture over a time period by issuing appropriate touch events. x X coordinate of the start of the gesture in CSS pixels. y Y coordinate of the start of the gesture in CSS pixels. scaleFactor Relative scale factor after zooming (>1.0 zooms in, <1.0 zooms out). relativeSpeed Relative pointer 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).

Implementation

Future<void> synthesizePinchGesture(num x, num y, num scaleFactor,
    {int? relativeSpeed, GestureSourceType? gestureSourceType}) async {
  await _client.send('Input.synthesizePinchGesture', {
    'x': x,
    'y': y,
    'scaleFactor': scaleFactor,
    if (relativeSpeed != null) 'relativeSpeed': relativeSpeed,
    if (gestureSourceType != null) 'gestureSourceType': gestureSourceType,
  });
}