Skip to content
pubscout

retry

3.1.2, released 4 years ago by google.dev

Provides automatic retry with exponential back‑off for async functions.

WASM-readyQuiet but busy
$ flutter pub add retry
Source repository

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.

  • async

    Utility classes and helpers that extend Dart's async library.

  • flutter_flavorizr

    A utility to easily create and configure application flavors in Flutter.

  • pool

    Manage a finite pool of resources to control concurrent operations.

Works with

Packages commonly used together with retry: ones it builds on, ones built on it, and its own family.