Flag class cli
An on/off switch, like --verbose or -v.
A flag is false unless the user types it. Give it to a Command or CLI
in their flags list, then read it in run with input.flag('verbose').
Flag('verbose', short: 'v', help: 'Print extra detail')
Constructors
Properties
- defaultValue → bool
-
The value used when the user doesn't type the flag.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- help → String
-
One line explaining the flag, shown in the help screen.
final
-
Whether to leave the flag out of the help screen.
final
- name → String
-
The long name, typed with two dashes as
--name.final - negatable → bool
-
Whether
--no-nameis allowed to turn the flag off.final - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- short → String?
-
An optional short name: one lowercase letter, typed as
-x.final
Methods
-
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