userListFromJson function
Converts a JSON string into a UserList object.
This function decodes the provided JSON string into a map and then uses the UserList.fromJson constructor to create a UserList object.
Parameters:
str
- A JSON string representing a list of users.
Returns: A UserList object.
Implementation
UserList userListFromJson(String str) => UserList.fromJson(json.decode(str));