toJson method

Map<String, dynamic> toJson()

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;
}