argParser property

  1. @override
ArgParser get argParser
override

The argument parser for this command.

Options for this command should be registered with this parser (often in the constructor); they'll end up available via argResults. Subcommands should be registered with addSubcommand rather than directly on the parser.

This can be overridden to change the arguments passed to the ArgParser constructor.

Implementation

@override
ArgParser get argParser => ArgParser()
  ..addOption(
    'config',
    abbr: 'c',
    defaultsTo: 'distribution.yaml',
    help: 'Configuration used to discover custom output directories.',
  )
  ..addFlag('flutter', negatable: false, help: 'Run flutter clean.')
  ..addFlag('outputs', negatable: false, help: 'Remove distribution outputs.')
  ..addFlag('all', negatable: false, help: 'Clean Flutter and outputs.')
  ..addFlag(
    'dry-run',
    negatable: false,
    help: 'Print what would be removed without changing files.',
  );