CommandFlag class

A named flag declaration.

Annotations

Constructors

CommandFlag({required String name, String abbr = '', String help = '', bool negatable = false, bool takesValue = false, Object? defaultsTo})
const

Properties

abbr String
The short form, e.g. n (renders as -n). Empty string if no abbreviation.
final
defaultsTo Object?
Default value when the flag is absent.
final
hashCode int
The hash code for this object.
no setterinherited
help String
Help text for the flag.
final
name String
The long form, e.g. --name.
final
negatable bool
Whether the flag can be negated as --no-<name>.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
takesValue bool
Whether the flag takes a value (--name=value).
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