memberFromJson function

List<ProfileDetails> memberFromJson(
  1. String str
)

Converts a JSON string into a list of ProfileDetails objects.

This function decodes the given JSON string and uses the fromJson constructor of the ProfileDetails class to create a list of instances.

Parameters: str - A JSON string representation of a list of ProfileDetails objects.

Returns: A list of ProfileDetails instances populated with data from the given JSON string.

Implementation

List<ProfileDetails> memberFromJson(String str) => List<ProfileDetails>.from(
    json.decode(str).map((x) => ProfileDetails.fromJson(x)));