runNativeTapCli function

Future<int> runNativeTapCli(
  1. List<String> args
)

CLI adapter for fdb native-tap.

Accepts: --x <n> X coordinate --y <n> Y coordinate --at <x,y> Coordinate shorthand (e.g. 200,400) --logical Coordinates are Flutter logical pixels (Android scales them) --text <label> Tap the native element with this label (Android, iOS simulator) --index <n> Which --text match to tap (0-based) --timeout <secs> How long --text waits for a match (default: 5)

Implementation

Future<int> runNativeTapCli(List<String> args) {
  final parser = ArgParser()
    ..addOption('x')
    ..addOption('y')
    ..addOption('at')
    ..addFlag(
      'logical',
      negatable: false,
      help: 'Treat --at/--x/--y as Flutter logical pixels. Android multiplies them by the device pixel ratio; '
          'on the iOS simulator coordinates are already points, so it changes nothing.',
    )
    ..addOption(
      'text',
      help: 'Tap the native element with this label. Android matches text, content-desc or resource-id; '
          'the iOS simulator matches the accessibility label or identifier (system alerts included).',
    )
    ..addOption('index', help: 'With --text: which match to tap, 0-based, in screen order.')
    ..addOption('timeout', help: 'With --text: seconds to wait for a match (default: 5).');

  return runCliAdapter(parser, args, _execute);
}