handleResponse static method

Future<Response> handleResponse(
  1. Response response
)

Implementation

static Future<http.Response> handleResponse(http.Response response) async {
  switch (response.statusCode) {
    case unauthorizedError:
      showToastMsg("UNAUTHORISED ACCESS");
      return response;
    case unknownError:
      showToastMsg("UNAUTHORISED ACCESS");
      return response;
    default:
      return response;
  }
}