getUserFromHttpResponse method
- Response response
Extracts a User object from the HTTP response.
This method parses the response body and converts it into a User object.
response: The HTTP response containing user data.
Returns a User object parsed from the HTTP response body.
Implementation
User getUserFromHttpResponse(http.Response response) {
var userJsonDecoded = jsonDecode(utf8.decode(response.bodyBytes));
return User.fromMap(userJsonDecoded);
}