checkApiSuccess property

GetValueFromResponse<bool?>? checkApiSuccess
getter/setter pair

Function to check if the API response indicates success.

Implementation

GetValueFromResponse<bool?>? checkApiSuccess =
    (dynamic response, {String? url, int? httpCode}) {
  if (![200, 201].contains(httpCode)) {
    return false;
  }
  return true;
};