AllowAnythingParser class
An ArgParser that treats all input as non-option arguments.
- Implemented types
Constructors
Properties
- allowsAnything → bool
-
Whether or not this parser treats unrecognized options as non-option
arguments.
no setteroverride
- allowTrailingOptions → bool
-
Whether or not this parser parses options that appear after non-option
arguments.
no setteroverride
-
commands
→ Map<
String, ArgParser> -
The commands that have been defined for this parser.
no setteroverride
- hashCode → int
-
The hash code for this object.
no setterinherited
-
options
→ Map<
String, Option> -
The options that have been defined for this parser.
no setteroverride
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- usage → String
-
Generates a string displaying usage information for the defined options.
no setteroverride
- usageLineLength → int?
-
An optional maximum line length for usage messages.
no setteroverride
Methods
-
addCommand(
String name, [ArgParser? parser]) → ArgParser -
Defines a command.
override
-
addFlag(
String name, {String? abbr, String? help, bool? defaultsTo = false, bool negatable = true, void callback(bool)?, bool hide = false, List< String> aliases = const []}) → void -
Defines a boolean flag.
override
-
addMultiOption(
String name, {String? abbr, String? help, String? valueHelp, Iterable< String> ? allowed, Map<String, String> ? allowedHelp, Iterable<String> ? defaultsTo, void callback(List<String> )?, bool splitCommas = true, bool hide = false, List<String> aliases = const []}) → void -
Defines an option that takes multiple values.
override
-
addOption(
String name, {String? abbr, String? help, String? valueHelp, Iterable< String> ? allowed, Map<String, String> ? allowedHelp, String? defaultsTo, void callback(String?)?, bool allowMultiple = false, bool? splitCommas, bool mandatory = false, bool hide = false, List<String> aliases = const []}) → void -
Defines an option that takes a value.
override
-
addSeparator(
String text) → void -
Adds a separator line to the usage.
override
-
defaultFor(
String option) → dynamic -
Returns the default value for
option
.override -
findByAbbreviation(
String abbr) → Option? -
Finds the option whose abbreviation is
abbr
, ornull
if no option has that abbreviation.override -
findByNameOrAlias(
String name) → Option? -
Finds the option whose name or alias matches
name
, ornull
if no option has that name or alias.override -
getDefault(
String option) → dynamic -
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
parse(
Iterable< String> args) → ArgResults -
Parses
args
, a list of command-line arguments, matches them against the flags and options defined by this parser, and returns the result.override -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited