APubCommand constructor

APubCommand({
  1. required PubspecLock pubspecLock,
  2. required PubspecYaml pubspecYaml,
  3. required Bindings bindings,
  4. required FindFile findFile,
  5. required Logger logger,
  6. required FileSystem fs,
})

Implementation

APubCommand({
  required this.pubspecLock,
  required this.pubspecYaml,
  required this.bindings,
  required this.findFile,
  required this.logger,
  required this.fs,
}) {
  argParser
    ..addFlag(
      'recursive',
      abbr: 'r',
      negatable: false,
      help: 'Run command recursively in all subdirectories.',
    )
    ..addFlag(
      'concurrent',
      aliases: ['parallel'],
      abbr: 'c',
      defaultsTo: true,
      help: 'Run command concurrently in all subdirectories.',
    )
    ..addFlag(
      'bail',
      abbr: 'b',
      negatable: false,
      help: 'Stop running commands if one fails.',
    )
    ..addFlag(
      'dart-only',
      negatable: false,
      help: 'Only run command in Dart projects.',
    )
    ..addFlag(
      'separated',
      help: 'Runs concurrent dart and flutter commands separately. '
          'Does nothing if --concurrent is not enabled.',
    )
    ..addFlag(
      'flutter-only',
      negatable: false,
      help: 'Only run command in Flutter projects.',
    );
}