statusListToJson function

String statusListToJson(
  1. List<Status> data
)

Converts a list of Status objects into a JSON string.

This function takes the provided list of Status objects, converts each to a JSON map using the toJson method, and then encodes the list of maps as a JSON string.

data: The list of Status objects to be converted.

Returns a JSON string representation of the list of Status objects.

Implementation

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