DownloadCommand constructor

DownloadCommand(
  1. Future<CliContext> context()
)

Creates the command.

Implementation

DownloadCommand(super.context) {
  argParser
    ..addOption('package', abbr: 'p', help: 'Package name or id.')
    ..addOption(
      'version',
      help: 'Version to fetch. Defaults to the latest on --channel.',
    )
    ..addOption(
      'channel',
      abbr: 'c',
      help: 'Channel to take the latest from.',
      allowed: ['dev', 'beta', 'release'],
    )
    ..addMultiOption(
      'platform',
      help:
          'Platforms to download for; repeatable and comma-separated. '
          'Defaults to this machine (${Platforms.current}). Pass "all" for '
          "every artifact in the release, or \"any\" to ignore the release's "
          'platform tags and select by name instead.',
    )
    ..addMultiOption(
      'kind',
      help:
          'Kinds to download; repeatable and comma-separated, e.g. '
          'installer, archive, checksums, signature. Defaults to what is '
          'installable, so a checksum file is never fetched as the build '
          'itself.',
    )
    ..addOption('asset', abbr: 'a', help: 'Asset id or name to fetch.')
    ..addOption(
      'output',
      abbr: 'o',
      help:
          'Destination file, or directory when more than one artifact is '
          'selected.',
      defaultsTo: '.',
    );
}