profiledata function
Converts a JSON string into a ProfileDetails object.
This function decodes the given JSON string and uses the fromJson
constructor of the ProfileDetails class to create an instance.
Parameters:
str
- A JSON string representation of a ProfileDetails object.
Returns: An instance of ProfileDetails populated with data from the given JSON string.
Implementation
ProfileDetails profiledata(String str) =>
ProfileDetails.fromJson(json.decode(str.toString()));