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