SyncPayload class

The serializable envelope exchanged between peers during a sync.

{
  "v": 1,
  "sender": "node-uuid",
  "ts": 1234567890,
  "nodes": [ { "id": "...", "role": 0, ... }, ... ],
  "msgs": [ { "id": "...", "from": "...", ... }, ... ]
}

Constructors

SyncPayload({required int protocolVersion, required String senderNodeId, required int syncTimestamp, required List<SyncNodeEntry> nodes, required List<SyncMessageEntry> messages})
const
SyncPayload.fromJson(Map<String, dynamic> json)
Deserialize from a JSON map.
factory

Properties

hashCode int
The hash code for this object.
no setterinherited
messages List<SyncMessageEntry>
final
nodes List<SyncNodeEntry>
final
protocolVersion int
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
senderNodeId String
final
syncTimestamp int
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
Serialize to a JSON map. Uses short keys to minimize payload size.
toString() String
A string representation of this object.
inherited

Operators

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