parseResponseAsJson static method
dynamic
parseResponseAsJson(
- Response response
Response as it comes from the server converted to JSON
Implementation
static dynamic parseResponseAsJson(Response response) {
if (response.statusCode == 200) {
return convert.jsonDecode(response.body);
} else {
print('Request failed with status: ${response.statusCode}.');
}
return {};
}