toJson method
Implementation
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = <String, dynamic>{};
data['msgId'] = msgId;
data.putIfNotNull('body', body?.toJson());
data.putIfNotNull('attributes', attributes);
data['from'] = from;
data['to'] = to;
data['convId'] = convId;
data['chatType'] = chatType.index;
data['timestamp'] = timestamp;
data.putIfNotNull('highlightTexts', highlightTexts);
return data;
}