simulateSwipe static method

Future<bool> simulateSwipe(
  1. double x1,
  2. double y1,
  3. double x2,
  4. double y2, {
  5. int duration = 300,
})

Implementation

static Future<bool> simulateSwipe(
  double x1,
  double y1,
  double x2,
  double y2, {
  int duration = 300,
}) async {
  try {
    final result = await _channel.invokeMethod('simulateSwipe', {
      'x1': x1,
      'y1': y1,
      'x2': x2,
      'y2': y2,
      'duration': duration,
    });
    return result as bool;
  } catch (e) {
    return false;
  }
}