RetryPolicy class
Retry policy configuration.
- Annotations
-
- @immutable
Constructors
- RetryPolicy({int maxRetries = 3, Duration initialDelay = const Duration(seconds: 1), Duration maxDelay = const Duration(seconds: 60), double jitter = 0.1})
-
Creates a RetryPolicy.
const
Properties
- hashCode → int
-
The hash code for this object.
no setteroverride
- initialDelay → Duration
-
Initial delay before first retry.
final
- jitter → double
-
Jitter factor (0.0 - 1.0).
final
- maxDelay → Duration
-
Maximum delay between retries.
final
- maxRetries → int
-
Maximum number of retry attempts.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override
Constants
- defaultPolicy → const RetryPolicy
- Default retry policy (3 retries, 1s initial delay, 60s max delay).