CliOptList extension

Extension methods to manipulate command-line arguments. Returns true if more values can be added, or false otherwise.

on

Methods

addCliOpt(List<CliOptDef> optDefs, String? name, {bool isPositive = true, String? value, int argNo = -1}) bool

Available on List<CliOpt>, provided by the CliOptList extension

Add new option and/or value to the list of parsed options
findCliOptByName(String? name) CliOpt?

Available on List<CliOpt>, provided by the CliOptList extension

Finds existing argument by option name (no prefix)
getDateValue(String name) DateTime?

Available on List<CliOpt>, provided by the CliOptList extension

Get string value
getDateValues(String name) List<DateTime>

Available on List<CliOpt>, provided by the CliOptList extension

Get string values
getGlobValue(String name, {GlobOpt? options}) → Glob?

Available on List<CliOpt>, provided by the CliOptList extension

Get Glob value
getGlobValues(String name, {GlobOpt? options}) List<Glob>

Available on List<CliOpt>, provided by the CliOptList extension

Get Glob values
getIntValue(String name, {int radix = 10}) int?

Available on List<CliOpt>, provided by the CliOptList extension

Get int value
getIntValues(String name, {int radix = 10}) List<int>

Available on List<CliOpt>, provided by the CliOptList extension

Get int values
getNumValue(String name) num

Available on List<CliOpt>, provided by the CliOptList extension

Get num value
getNumValues(String name) List<num>

Available on List<CliOpt>, provided by the CliOptList extension

Get num values
getRegExpValue(String name, {RegExpOpt? options}) RegExp?

Available on List<CliOpt>, provided by the CliOptList extension

Get RegExp value
getRegExpValues(String name, {RegExpOpt? options}) List<RegExp>

Available on List<CliOpt>, provided by the CliOptList extension

Get RegExp values
getStrValue(String name) String?

Available on List<CliOpt>, provided by the CliOptList extension

Get string value
getStrValues(String name) List<String>

Available on List<CliOpt>, provided by the CliOptList extension

Get string values
getValue(String name, String typeName, CliOptValueConverter? converter, {dynamic param}) → dynamic

Available on List<CliOpt>, provided by the CliOptList extension

Get abstract single value
getValues(String name, String typeName, CliOptValueConverter? converter, {dynamic param}) List

Available on List<CliOpt>, provided by the CliOptList extension

Get abstract values
isSet(String name) bool

Available on List<CliOpt>, provided by the CliOptList extension

Get the flag
toSimpleMap() Map<String, List<String>>

Available on List<CliOpt>, provided by the CliOptList extension

Converter: to numeric value
validateValueCounts() → void

Available on List<CliOpt>, provided by the CliOptList extension

Validate the number of values for each option

Static Methods

toDateValue(CliOptDef optDef, String value, {dynamic param}) DateTime?

Available on List<CliOpt>, provided by the CliOptList extension

Converter: to date/time value
toGlobValue(CliOptDef optDef, String value, {dynamic param}) → Glob?

Available on List<CliOpt>, provided by the CliOptList extension

Converter: to Glob value
toIntValue(CliOptDef optDef, String value, {dynamic param}) int?

Available on List<CliOpt>, provided by the CliOptList extension

Converter: to integer value
toNumValue(CliOptDef optDef, String value, {dynamic param}) num?

Available on List<CliOpt>, provided by the CliOptList extension

Converter: to numeric value
toRegExpValue(CliOptDef optDef, String value, {dynamic param}) RegExp?

Available on List<CliOpt>, provided by the CliOptList extension

Converter: to RegExp value