CommandResult class

The parsed arguments a LiveCommand receives.

Mirrors the CommandResult used by Metro commands. Values missing from the call fall back to the defaults declared in CommandBuilder.

Constructors

CommandResult(Map<String, dynamic> values, {List<Map<String, Object?>> schema = const [], List<String> rest = const []})
Creates a result from already-parsed values.

Properties

hashCode int
The hash code for this object.
no setterinherited
rest List<String>
Positional arguments that followed the command name.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

get<T>(String name) → T?
Get a value, falling back to its declared default.
getBool(String name, {bool? defaultValue}) bool?
Get a boolean value. Accepts true/false booleans or strings.
getDouble(String name, {double? defaultValue}) double?
Get a double value. Accepts numbers or numeric strings.
getInt(String name, {int? defaultValue}) int?
Get an integer value. Accepts integers or numeric strings.
getString(String name, {String? defaultValue}) String?
Get a string value.
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