decodeResponse<Value> method
Used to decode the response body before returning from an API call
Implementation
Future<Response<Value?>> decodeResponse<Value>(
Response<String?> response, Type responseType, bool responseIsList) async {
final converted =
await converter?.decode(response, responseType, responseIsList) ??
response;
return converted as Response<Value?>;
}