retry
3.1.2, released 4 years ago by google.dev
Provides automatic retry with exponential back‑off for async functions.
What it does
Wraps a Future‑returning function and retries it on specified errors. Allows configuration of max attempts and back‑off intervals via RetryOptions.
AI-written summary of version 3.1.2, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need resilient network calls that may fail intermittently
- You want simple exponential back‑off without adding custom logic
Skip it when
- You require sophisticated retry policies like jitter algorithms beyond the built‑in +/-25%
- You need retry support for streams or reactive pipelines
Strengths
- Zero external dependencies
- Built‑in exponential back‑off with configurable attempts
- Works on all Dart platforms
Weaknesses
- Limited to simple Future‑based retries
- No built‑in jitter customization beyond the fixed variance
Setup
- Kind
- Pure Dart
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 0
Alternatives
Packages that do the same job and could replace retry.
- gtk
GTK utilities for Flutter Linux applications, providing settings and application lifecycle helpers.
76Compare - async
Utility classes and helpers that extend Dart's async library.
83Compare - flutter_flavorizr
A utility to easily create and configure application flavors in Flutter.
86Compare - pool
Manage a finite pool of resources to control concurrent operations.
91Compare
Works with
Packages commonly used together with retry: ones it builds on, ones built on it, and its own family.
- panaBuilt on retryProduce a report summarizing the health and quality of a Dart package
- safe_url_checkBuilt on retryCheck if an untrusted URL is broken without allowing connections to private IP addresses.
- gcloudBuilt on retryHigh-level Dart API for Google Cloud Storage, Pub/Sub, and Datastore.
- amplify_coreBuilt on retryBase package containing common types and utilities for AWS Amplify Flutter packages.
- cli_pkgBuilt on retryGrinder tasks for releasing Dart CLI packages.
- google_cloud_firestoreBuilt on retryA Dart client library for Google Cloud Firestore database.
- clerk_authBuilt on retryDart SDK for Clerk authentication and user management.
- neat_periodic_taskBuilt on retryAuxiliary classes for reliably running periodic tasks in long-running processes.