DefaultRetryPolicy class
Sensible default implementation of RetryPolicy.
- Implemented types
Constructors
- DefaultRetryPolicy({int maxAttempts = 5, Duration retryDelay = const Duration(seconds: 2)})
- Creates a DefaultRetryPolicy.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- maxAttempts → int
-
Maximum number of attempts allowed for a single request.
final
- retryDelay → Duration
-
The delay to wait before retrying the next request in the queue.
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
-
shouldRetry(
QueuedRequest request, Object error) → bool -
Determines if a request should be retried based on its current state
and the
errorthat occurred during the last attempt.override -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited