RetryClient.withDelays constructor Null safety

  1. Client inner,
  2. Iterable<Duration> delays,
  3. {bool when(
    1. BaseResponse
    ) = _defaultWhen,
  4. bool whenError(
    1. Object,
    2. StackTrace
    ) = _defaultWhenError,
  5. void onRetry(
    1. BaseRequest,
    2. BaseResponse?,
    3. int retryCount

Like new RetryClient, but with a pre-computed list of delays between each retry.

This will retry a request at most delays.length times, using each delay in order. It will wait for delays[0] after the initial request, delays[1] after the first retry, and so on.


  Client inner,
  Iterable<Duration> delays, {
  bool Function(BaseResponse) when = _defaultWhen,
  bool Function(Object, StackTrace) whenError = _defaultWhenError,
  void Function(BaseRequest, BaseResponse?, int retryCount)? onRetry,
}) : this._withDelays(
        when: when,
        whenError: whenError,
        onRetry: onRetry,