mapStatusCodeFromResponse property

int? Function(Map<String, dynamic>? data)? mapStatusCodeFromResponse
final

By default, the response of doApiRequest method has the status code retrieved by the http header. Sometimes, this status code is overridden by a code in the response body. You can use this method to map that code from body and use it to override the http status code.

Note that the data argument is nullable because the parse of body to Map can fail. If the returned int is null, the default http status code will be used.

Implementation

final int? Function(Map<String, dynamic>? data)? mapStatusCodeFromResponse;