Retry class

Marks a UseCase or datasource method for automatic retry on failure.

The DDA pipeline generates a retry wrapper that catches retryable failures and re-executes with the configured backoff strategy.

Constructors

Retry({int attempts = 3, BackoffStrategy backoff = BackoffStrategy.exponential, Duration maxDelay = const Duration(seconds: 30), Duration baseDelay = const Duration(seconds: 1), Duration? maxCumulativeTime, List<String> retryOn = const ['network', 'server']})
const
Retry.fixed({int attempts = 3, Duration delay = const Duration(seconds: 2)})
Convenience constructor for a simple fixed-delay retry.
const

Properties

attempts → int
Maximum number of attempts (including the initial call).
final
backoff → BackoffStrategy
Backoff strategy between retries.
final
baseDelay → Duration
Base duration for exponential backoff.
final
hashCode → int
The hash code for this object.
no setterinherited
maxCumulativeTime → Duration?
Retry budget: maximum cumulative time across all attempts.
final
maxDelay → Duration
Maximum delay between retries.
final
retryOn → List<String>
Failure types that trigger a retry.
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.
inherited