statusDataFromJson function
Converts a JSON string into a list of StatusData objects.
This function decodes the given JSON string and maps each JSON object to a StatusData instance using the StatusData.fromJson constructor.
Parameters:
str
- A JSON string representation of a list of StatusData objects.
Returns: A list of StatusData instances populated with data from the given JSON string.
Implementation
List<StatusData> statusDataFromJson(String str) =>
List<StatusData>.from(json.decode(str).map((x) => StatusData.fromJson(x)));