userListToJson function

String userListToJson(
  1. UserList data
)

Converts a UserList object into a JSON string.

This function takes a UserList object, converts it into a map using the toJson method, and then encodes this map as a JSON string.

Parameters: data - The UserList object to be converted into a JSON string.

Returns: A JSON string representation of the UserList object.

Implementation

String userListToJson(UserList data) => json.encode(data.toJson());