statusDataToJson function

String statusDataToJson(
  1. List<StatusData> data
)

Converts a list of StatusData objects into a JSON string.

This function takes a list of StatusData objects, converts each object into a map using the toJson method, and then encodes the list of maps as a JSON string.

Parameters: data - The list of StatusData objects to be converted into a JSON string.

Returns: A JSON string representation of the list of StatusData objects.

Implementation

String statusDataToJson(List<StatusData> data) =>
    json.encode(List<dynamic>.from(data.map((x) => x.toJson())));