CommandAck class Null safety

Acknowlegement command sent in response to acknowledge a remote command. This will include the id of the command being ack'd in the commandId.

The success parameter is used to toggle this between an "ack" and a "nack". When it is null, that should be intrepretited as if the command was received, processing has started, but processing of it has not been completed.

Inheritance

Constructors

CommandAck({required String commandId, String? id, String? message, CommandResponse? response, bool? success, DateTime? timestamp})

Properties

commandId String
final
hashCode int
The hash code for this object. [...]
read-only, inherited
id String
The unique id of the command. Used to identify replies associated with the command.
final, inherited
message String?
final
payload → dynamic
The payload of the command. Each command must define the structure of the payload.
final, inherited
response CommandResponse?
final
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
success bool?
final
timestamp DateTime
The timestamp the command was created.
final, inherited
type String
The type of the command. This is used by the system to deserialize the command from JSON into the proper model.
final, inherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
toJson() Map<String, dynamic>
Encodes this command into a JSON compatible map.
inherited
toString() String
Returns the string encoded JSON representation for this class. This will remove all null values and empty collections from the returned string.
inherited

Operators

operator ==(Object other) bool
The equality operator. [...]
inherited

Static Methods

fromDynamic(dynamic map, String id, DateTime timestamp) CommandAck
Deserializes the command from a Map or a map-like object into the the proper data model. This will throw an exception if map is null.
override

Constants

kCommandType → const String
'ack'