AllowAnythingParser class Null safety

An ArgParser that treats all input as non-option arguments.

Implemented types

Constructors

AllowAnythingParser()

Properties

allowsAnything bool
Whether or not this parser treats unrecognized options as non-option arguments.
read-only, override
allowTrailingOptions bool
Whether or not this parser parses options that appear after non-option arguments.
read-only, override
commands Map<String, ArgParser>
The commands that have been defined for this parser.
read-only, override
hashCode int
The hash code for this object. [...]
read-only, inherited
options Map<String, Option>
The options that have been defined for this parser.
read-only, override
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
usage String
Generates a string displaying usage information for the defined options. [...]
read-only, override
usageLineLength int?
An optional maximum line length for usage messages. [...]
read-only, override

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, or null if no option has that abbreviation.
override
findByNameOrAlias(String name) Option?
Finds the option whose name or alias matches name, or null if no option has that name or alias.
override
getDefault(String option) → dynamic
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent 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