core/hardware_retry library

Functions

withRetry<T>(Future<T> operation(), {int maxAttempts = 3, Duration initialDelay = const Duration(milliseconds: 200), double backoffFactor = 2.0, bool shouldRetry(Exception)?}) Future<T>
Runs the operation and retries it on transient failures (e.g. TIMEOUT, DEVICE_BUSY) using exponential backoff.