convertToMap static method

Map<String, dynamic>? convertToMap(
  1. Response response
)

Returns the JSON as a Map from the response, if any.

Implementation

static Map<String, dynamic>? convertToMap(Response<dynamic> response) {
  if (response.data != null && isJsonResponse(response)) {
    return json.decode(response.data);
  }
  return null;
}