recentChatDataListFromJson function
Converts a JSON string into a list of RecentChatData objects.
This function decodes the given JSON string and uses the fromJson
constructor
of the RecentChatData class to create a list of instances.
Parameters:
str
- A JSON string representation of a list of RecentChatData objects.
Returns: A list of RecentChatData instances populated with data from the given JSON string.
Implementation
List<RecentChatData> recentChatDataListFromJson(String str) =>
List<RecentChatData>.from(
json.decode(str).map((x) => RecentChatData.fromJson(x)));