CommandBuilder class

A fluent wrapper around ArgParser to make command definitions more readable.

Constructors

CommandBuilder()
Creates a new CommandBuilder.

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
usage String
Get the usage string for help text
no setter

Methods

addFlag(String name, {String? abbr, String? help, bool defaultValue = false}) CommandBuilder
Add a flag (boolean option, --flag or -f)
addOption(String name, {String? abbr, String? help, List<String>? allowed, String? defaultValue}) CommandBuilder
Add an option (--option or -o)
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
parse(List<String> arguments) CommandResult
Parse arguments and return a result object with convenient accessors
toString() String
A string representation of this object.
inherited

Operators

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