CliRunner<T> constructor

CliRunner<T>(
  1. String executableName,
  2. String description, {
  3. String? version,
  4. Logger? logger,
  5. int? usageLineLength,
  6. int suggestionDistanceLimit = 2,
  7. bool completions = true,
})

usageLineLength defaults to the terminal width, or 80 without a terminal. logger defaults to a new Logger.

Implementation

CliRunner(
  super.executableName,
  super.description, {
  this.version,
  Logger? logger,
  int? usageLineLength,
  super.suggestionDistanceLimit,
  this.completions = true,
})  : logger = logger ?? Logger(),
      super(
        usageLineLength: usageLineLength ??
            (io.stdout.hasTerminal ? io.stdout.terminalColumns : 80),
      ) {
  _helpCommand = commands['help'];
}