nextDelay method

  1. @override
Duration? nextDelay(
  1. int attempt,
  2. Object error,
  3. StackTrace stackTrace
)
override

Returns the delay before the next retry, or null for immediate retry

attempt is the current attempt number (0-based for first attempt). error is the error that caused the failure. stackTrace is the stack trace of the error.

Implementation

@override
Duration? nextDelay(int attempt, Object error, StackTrace stackTrace) {
  return null; // No delay between retries
}