profileDetailsFromJson function
Converts a JSON string into a list of ProfileDetails objects.
This function decodes the provided JSON string into a list of maps, and then maps each one to a ProfileDetails object using the ProfileDetails.fromJson factory.
Parameters:
str
- A JSON string representing a list of profile details.
Returns: A list of ProfileDetails objects.
Implementation
List<ProfileDetails> profileDetailsFromJson(String str) =>
List<ProfileDetails>.from(
json.decode(str).map((x) => ProfileDetails.fromJson(x)));