delayForAttempt method

Duration delayForAttempt(
  1. int attempt
)

Calculates the delay for a given attempt number.

Implementation

Duration delayForAttempt(int attempt) {
  final delay = initialDelay * (backoffMultiplier * attempt);
  return delay > maxDelay ? maxDelay : delay;
}