RetryPolicy.custom constructor
const
RetryPolicy.custom({})
Creates a custom backoff policy.
The delayForAttempt function is called with the attempt number (1-based)
and should return the delay before that attempt.
Implementation
const factory RetryPolicy.custom({
required int maxAttempts,
required Duration Function(int attempt) delayForAttempt,
}) = _CustomRetry;