runInputCli function
CLI adapter for fdb input. Accepts optional selector flags and a
positional text argument; emits one of:
INPUT=<fieldType> VALUE=<textToEnter> (success)
ERROR: No input text provided (no positional)
ERROR: Invalid value for --index: <raw> (bad index)
ERROR: fdb_helper not detected in running app. ... (no helper)
ERROR: <message> (relayed / generic)
ERROR: Unexpected response from ext.fdb.enterText: <raw> (unexpected)
(AppDiedException rethrown for dispatcher's _formatAppDied) (app died)
Implementation
Future<int> runInputCli(List<String> args) {
final parser = ArgParser()
..addOption('text', help: 'Select field by its label text')
..addOption('key', help: 'Select field by its ValueKey string')
..addOption('type', help: 'Select field by widget type name')
..addOption('index', help: 'Select the Nth matching field (0-based)');
return runCliAdapter(parser, args, _execute);
}