CompletionActionOption class
- Inheritance
-
- Object
- ConfigOptionBase<
CompletionShell> - EnumOption<
CompletionShell> - CompletionActionOption
- Mixed-in types
Constructors
- CompletionActionOption()
-
const
Properties
- acceptsPartialCommandLine → bool
-
Whether this action option accepts a partial command line,
i.e. runs even if the command line is incomplete.
no setterinherited
-
allConfigKeys
→ List<
String> -
Configuration lookup keys in order of precedence.
no setterinherited
-
allowedHelp
→ Map<
String, String> ? -
finalinherited
-
allowedValues
→ List<
CompletionShell> ? -
finalinherited
- argAbbrev → String?
-
finalinherited
-
argAliases
→ List<
String> ? -
finalinherited
- argName → String?
-
finalinherited
- argPos → int?
-
finalinherited
- configKey → String?
-
A single configuration source lookup key.
finalinherited
-
configKeys
→ List<
String> ? -
Configuration source lookup keys, in order of precedence.
finalinherited
- customValidator → void Function(CompletionShell value)?
-
A customValidator may be provided for an individual option.
If a value was provided the customValidator is invoked,
and shall throw a FormatException if its format is invalid,
or a InvalidValueException if the it is invalid for other reasons.
finalinherited
- defaultsTo → CompletionShell?
-
finalinherited
- defaultValueHelp → String?
-
Usage text for the default, shown instead of the formatted actual default value.
Set this when the actual default value is not what users should read.
For example, a computed directory can be shown as
<package-root>/lib/rather than its absolute path.finalinherited - envName → String?
-
finalinherited
-
fromCustom
→ CompletionShell? Function(Configuration<
OptionDefinition> cfg)? -
finalinherited
- fromDefault → CompletionShell Function()?
-
finalinherited
- group → OptionGroup?
-
An option group allows grouping options together under a common name,
and optionally provide option value validation on the group as a whole.
finalinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- helpText → String?
-
finalinherited
- hide → bool
-
finalinherited
- mandatory → bool
-
finalinherited
-
option
→ ConfigOptionBase<
CompletionShell> -
Returns self.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- valueHelp → String?
-
finalinherited
-
valueParser
→ ValueParser<
CompletionShell> -
finalinherited
Methods
-
allowedValueCandidates(
) → List< CompletionCandidate> ? -
Returns completion candidates for allowedValues with descriptions
from allowedHelp, or for the keys of allowedHelp alone,
or null if neither is set.
inherited
-
candidatesForValues(
Iterable< CompletionShell> values) → List<CompletionCandidate> -
Returns completion candidates for
values, formatted with valueParser and described by allowedHelp when available.inherited -
complete(
CompletionContext context) → FutureOr< CompletionResult> -
Offers the enum names, restricted to allowedValues when set,
with descriptions from allowedHelp.
inherited
-
defaultValue(
) → CompletionShell? -
inherited
-
defaultValueString(
) → String? -
The default value as shown in usage.
defaultValueHelp when set, otherwise the formatted defaultValue.
Returns null when the option has no default.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
qualifiedString(
) → String -
inherited
-
run<
O extends OptionDefinition, R> (CommandContext< O, R> context) → FutureOr<R?> -
Runs this action option.
contextis the context of the command that defined this action option.override -
toString(
) → String -
A string representation of this object.
inherited
-
validateDefinition(
) → void -
Validates the configuration option definition.
inherited
-
validateValue(
CompletionShell value) → void -
Validates the parsed value,
throwing a FormatException if the value is invalid,
or a InvalidValueException if the value is invalid for other reasons.
inherited
-
valueFromConfig(
Object value) → CompletionShell? -
A configuration value that is already a
V, or null when it is not.inherited -
valueHelpString(
) → String? -
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited