CommandBuilder class

Declares the options and flags of a LiveCommand.

Mirrors the CommandBuilder used by Metro commands. It only records the schema; Metro does the parsing on your machine.

Constructors

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
schema → List<Map<String, Object?>>
The declared options and flags, in declaration order.
no setter

Methods

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

Operators

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