checkApiSuccess static method

bool checkApiSuccess(
  1. Map<String, dynamic> response
)

Checks if an API response is successful

@param response The API response as a map @return true if the API response is successful, false otherwise

Implementation

static bool checkApiSuccess(Map<String, dynamic> response) {
  return response['status'] && isNullOrEmpty(getErrorMessage(response));
}