CommandResult class

Wrapper around ArgResults with convenient typed accessors.

Constructors

CommandResult(ArgResults _results, Map<String, dynamic> _defaults)
Creates a CommandResult from parsed _results and _defaults.

Properties

arguments List<String>
Get all the command line arguments
no setter
hasForceFlag bool
Check if force flag is set
no setter
hashCode int
The hash code for this object.
no setterinherited
hasHelpFlag bool
Check if help flag is set
no setter
rest List<String>
Get the rest arguments (unparsed)
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

get<T>(String name) → T?
Get a value with typed access, falling back to default if provided
getBool(String name, {bool? defaultValue}) bool?
Get a boolean value with a fallback
getInt(String name, {int? defaultValue}) int?
Get an integer value with a fallback
getString(String name, {String? defaultValue}) String?
Get a string value with a fallback
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