toMap method
Convert to map for serialization (without payload data)
Implementation
Map<String, dynamic> toMap() {
return {
'messageId': messageId,
'recipientPeerId': recipientPeerId.toString(),
'senderPeerId': senderPeerId.toString(),
'payloadSize': payload.length,
'priority': priority.value,
'expiryTimestamp': expiryTimestamp,
'hopCount': hopCount,
'flags': flags.value,
'createdTimestamp': createdTimestamp,
};
}