simulateTouch static method

Future<bool> simulateTouch(
  1. double x,
  2. double y
)

Implementation

static Future<bool> simulateTouch(double x, double y) async {
  if (x < 0 || y < 0) {
    log('⚠️ Coordenadas de toque inválidas: ($x, $y)');
    return false;
  }
  try {
    final result = await _channel.invokeMethod('simulateTouch', {
      'x': x,
      'y': y,
    });
    return result as bool? ?? false;
  } catch (e) {
    return false;
  }
}