toJson method
Generates a map representing the TransientMessage
.
Implementation
Map<String, dynamic> toJson() {
final map = <String, dynamic>{};
map['receiverId'] = receiverId;
map['receiverType'] = receiverType;
map['data'] = data;
if (sender != null) {
map['sender'] = sender!.toJson();
}
return map;
}