CommandResponse class
Base class for the command responses associated to the CommandAck.
Constructors
- CommandResponse({String? message, dynamic payload, bool? success, required String type})
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- message → String?
-
The optional message associated with the response.
final
- payload → dynamic
-
The type-specific payload. The value of which is defined by each
sub-class.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- success → bool?
-
Optional success flag. If set the process is complete. If null, the
process associated with the command is still running.
final
- type → String
-
The type. Used to define the payload and response class.
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> - Abstract function that concrete classes must implement. This must encode the internal data model to a JSON compatible representation.
-
toString(
) → String - Returns the string encoded JSON representation for this class. This will remove all null values and empty collections from the returned string.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
fromDynamic(
dynamic map) → CommandResponse? - Processes a Map or Map-like object into a response. If the map is null then this will return null.
-
registerCustomResponses(
Map< String, CommandResponse Function(dynamic, String?, bool?)> builders) → void - Allows application to register it's own custom responses.