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 {
  logger.info('Running flo_cli doctor...');

  final fs = locator<FileSystemService>();
  final currentDir = fs.exists('.');

  if (currentDir) {
    logger.success('[✓] File system service is working.');
  } else {
    logger.error('[✗] File system service failed to read current directory.');
  }

  logger.info('\\nDoctor found no major issues!');
  return 0;
}