OnRetryCallback typedef
Callback invoked before each retry attempt.
attempt - The retry attempt number (1 = first retry)
error - The error that caused the retry
nextDelay - How long until the next attempt
Implementation
typedef OnRetryCallback = void Function(
int attempt,
Object error,
Duration nextDelay,
);