runSwipePathCli function

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

CLI adapter for fdb swipe-path. Accepts --points and --precision.

Output contract:

SWIPED_PATH POINTS=n (success) ERROR: --points is required (missing --points) ERROR: Invalid --points value: "...". Expected format: x1,y1;x2,y2;... (at least 2 points). (malformed / too few points) ERROR: Invalid --precision value: "...". Expected a number. ERROR: fdb_helper not detected in running app. ... (no helper) ERROR: message (relayed error / generic) ERROR: Unexpected response from ext.fdb.swipePath: raw (AppDiedException rethrown for dispatcher's _formatAppDied)

Implementation

Future<int> runSwipePathCli(List<String> args) {
  final parser = ArgParser()
    ..addOption(
      'points',
      help: 'Semicolon-separated list of x,y screen-coordinate pairs (at least 2)',
    )
    ..addOption(
      'precision',
      help: 'Max pixel gap between synthesized move events (default: 8.0)',
    );
  return runCliAdapter(parser, args, _execute);
}