RetryInterceptor constructor

RetryInterceptor({
  1. RetryOptions? options,
  2. double random()?,
  3. DateTime clock()?,
  4. Future<void> delay(
    1. Duration,
    2. CancellationToken
    )?,
})

Implementation

RetryInterceptor(
    {RetryOptions? options,
    double Function()? random,
    DateTime Function()? clock,
    Future<void> Function(Duration, CancellationToken)? delay})
    : options = options ?? RetryOptions(),
      _random = random ?? Random().nextDouble,
      _clock = clock ?? DateTime.now,
      _delay = delay ?? ((duration, token) => token.wait(duration));