toJson method
Converts the RecentChatData object to a JSON map.
Returns a Map<String, dynamic> representing the JSON data.
Implementation
Map<String, dynamic> toJson() => {
"data": data == null
? null
: List<dynamic>.from(data!.map((x) => x.toJson())),
};