CommandResponse class

The result of running a Command.

Constructors

CommandResponse(List<ValidationError> errors)
Creates a CommandResponse with errors;
const
CommandResponse.failed(List<ValidationError> errors)
Creates a failed CommandResponse and ensures it has errors.
CommandResponse.fromJson(Map<String, dynamic> json)
Creates a CommandResponse from JSON.
CommandResponse.success()
Creates a success CommandResponse without any errors.
const

Properties

errors → List<ValidationError>
Validation errors related to the data carried by the Command.
final
failed → bool
Whether the command has failed with errors.
no setter
hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
success → bool
Whether the command has succeeded.
no setter

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() → Map<String, dynamic>
Serializes this CommandResponse to JSON.
toString() → String
A string representation of this object.
override

Operators

operator ==(Object other) → bool
The equality operator.
inherited