GoodbyeCommand class
Command to tell the remote connection that the socket is about to be disconnected by the sender. If the complete attribute is true then the session is also being terminated. Otherwise, if the receiver initiates a reconnection then the session will be resumed.
- Inheritance
-
- Object
- DeviceCommand
- GoodbyeCommand
Constructors
- GoodbyeCommand.new({bool complete = false, String? id, DateTime? timestamp})
Properties
- complete → bool
-
Set to true when the session is being terminated. Set to false otherwise.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- id → String
-
The unique id of the command. Used to identify replies associated with
the command.
finalinherited
- payload → dynamic
-
The payload of the command. Each command must define the structure of
the payload.
finalinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- timestamp → DateTime
-
The timestamp the command was created.
finalinherited
- type → String
-
The type of the command. This is used by the system to deserialize the
command from JSON into the proper model.
finalinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent 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) → GoodbyeCommand -
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