memberToJson function

String memberToJson(
  1. List<ProfileDetails> data
)

Converts a list of ProfileDetails objects into a JSON string.

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

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

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

Implementation

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