defaultRetryEvaluator static method

FutureOr<bool> defaultRetryEvaluator(
  1. DioError error
)

Returns bool = true only if the response hasn't been cancelled or got a bas status code.

Implementation

static FutureOr<bool> defaultRetryEvaluator(DioError error) {
  return error.type != DioErrorType.cancel &&
      error.type != DioErrorType.response;
}