synthesizeTapGesture method

Future<void> synthesizeTapGesture(
  1. num x,
  2. num y, {
  3. int? duration,
  4. int? tapCount,
  5. GestureSourceType? gestureSourceType,
})

Synthesizes a tap 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. duration Duration between touchdown and touchup events in ms (default: 50). tapCount Number of times to perform the tap (e.g. 2 for double tap, default: 1). gestureSourceType Which type of input events to be generated (default: 'default', which queries the platform for the preferred input type).

Implementation

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