canRetry static method
Whether error is retryable and has a request-local attempt remaining.
Implementation
static bool canRetry(DioException error) {
final options = error.requestOptions;
final retryCount = _nonNegativeInt(options.extra[retryCountKey]);
return retryCount < _resolveMaximumRetries(options) &&
_isRetryableTransportFailure(error);
}