delay method
Returns the delay before the given attempt (0-indexed).
Implementation
@override
Duration delay(int attempt) {
final ms = baseDelay.inMilliseconds * (attempt + 1);
final capped = math.min(ms, maxDelay.inMilliseconds);
return Duration(milliseconds: capped);
}