run method

  1. @override
Future<int> run()
override

Runs this command.

The return value is wrapped in a Future if necessary and returned by CommandRunner.runCommand.

Implementation

@override
Future<int> run() async {
  final result = await processRunner.runCommand(
    ['flutter', 'custom-devices', 'list'],
    parseResult: (result) => result,
    spinner: interaction.spinner(
      inProgressMessage: 'Searching for custom devices...',
      doneMessage: 'Searching for custom devices completed!',
      failedMessage: 'Searching for custom devices failed!',
    ),
  );

  logger.spaces();

  logger.info(result!.stdout);
  logger.detail(result.stderr);

  return result.exitCode;
}