ExponentialBackoffRetryPolicy constructor
ExponentialBackoffRetryPolicy({})
Creates the policy.
maxAttempts is the total number of
attempts (including the first). So with
maxAttempts: 5, the caller will make 5
attempts before giving up.
Implementation
ExponentialBackoffRetryPolicy({
this.maxAttempts = 5,
this.baseDelay = const Duration(seconds: 1),
this.factor = 2,
this.maxDelay = const Duration(seconds: 30),
this.jitter = const Duration(milliseconds: 100),
Random? random,
}) : _random = random ?? Random();