CliRunner class

Inheritance
  • Object
  • CommandRunner<void>
  • CliRunner

Constructors

CliRunner({IOSink? sink})

Properties

$commands List<BaseCommand>
finalinherited
argParser → ArgParser
The top-level argument parser.
no setterinherited
commands Map<String, Command<void>>
An unmodifiable view of all top-level commands defined for this runner.
no setterinherited
description String
A short description of this executable.
finalinherited
executableName String
The name of the executable being run.
finalinherited
hashCode int
The hash code for this object.
no setterinherited
invocation String
A single-line template for how to invoke this executable.
no setterinherited
loggerTheme → LoggerTheme?
finalinherited
finalinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
finalinherited
sink IOSink?
finalinherited
suggestionDistanceLimit int
The maximum edit distance allowed when suggesting possible intended commands.
finalinherited
usage String
Generates a string displaying usage information for the executable.
no setterinherited
usageFooter String?
An optional footer for usage.
no setterinherited

Methods

addCommand(Command<void> command) → void
Adds Command as a top-level command to this runner.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
parse(Iterable<String> args) → ArgResults
Parses args and returns the result, converting an ArgParserException to a UsageException.
inherited
inherited
printUsage() → void
Prints the usage information for this runner.
inherited
run(Iterable<String> args) Future<void>
Parses args and invokes Command.run on the chosen command.
inherited
runCommand(ArgResults topLevelResults) Future<void>
Runs the command specified by topLevelResults.
inherited
toString() String
A string representation of this object.
inherited
usageException(String message) → Never
Throws a UsageException with message.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited