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 {
  return ArgParser()
    ..addFlag(
      'ascii',
      abbr: 'a',
      defaultsTo: false,
      negatable: false,
      help: 'Use only ASCII characters to draw the tree.',
    )
    ..addFlag('emojis', abbr: 'e', defaultsTo: false, negatable: false, help: 'Add emojis to the tree to indicate file types.')
    ..addFlag('include_hidden', abbr: 'i', defaultsTo: false, negatable: false, help: 'Include hidden files in the tree')
    ..addOption('depth', abbr: 'd', help: 'Set the maximum depth of the tree', defaultsTo: '-1')
    ..addFlag('all', abbr: 'A', defaultsTo: false, negatable: false, help: 'Include all files, ignoring .gitignore');
}