profileFromJson function
Converts a JSON string into a list of ProfileDetails.
This function decodes the given JSON string and maps each JSON object to a ProfileDetails instance using the ProfileDetails.fromJson constructor.
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> profileFromJson(String str) => List<ProfileDetails>.from(
json.decode(str).map((x) => ProfileDetails.fromJson(x)));