recentChatFromJson function
Converts a JSON string into a RecentChat object.
This function decodes the provided JSON string into a map and then uses the RecentChat.fromJson constructor to create a RecentChat object.
Parameters:
str
- A JSON string representing a single recent chat.
Returns: A RecentChat object.
Implementation
RecentChat recentChatFromJson(String str) =>
RecentChat.fromJson(json.decode(str));