polly_flutter library

polly_flutter — Flutter widgets with built-in resilience via polly_dart.

Import this library to access all resilient widgets:

import 'package:polly_flutter/polly_flutter.dart';

Classes

DefaultPipelines
Pre-built resilience pipelines for common Flutter use cases.
ErrorOptions
Options that control the default error widget appearance.
LoadingOptions
Options that control the default loading widget appearance.
ResilienceSnapshot<T>
A snapshot of the current resilience state for a typed value.
ResilienceStateNotifier<T>
A ChangeNotifier that holds and broadcasts a ResilienceSnapshot.
ResilienceTheme
An InheritedWidget that provides ResilienceThemeData to the widget tree.
ResilienceThemeData
Theme data for polly_flutter widgets.
ResilientButton
A button widget that wraps an async action in a ResiliencePipeline, providing debouncing, rate-limiting, retry, and loading-state management.
ResilientCachedBuilder<T>
A ResilientFutureBuilder variant that adds an in-memory cache layer.
ResilientConnectivityWrapper
Wraps child widgets and switches between onlineChild and offlineChild based on network connectivity status.
ResilientContainer
A general-purpose container that lazily runs an async initializer through a ResiliencePipeline and renders different widgets for each ResilienceStatus.
ResilientForm
A Form wrapper that submits through a ResiliencePipeline, managing validation, loading state, and error display automatically.
ResilientFormState
Exposes form submission state to the ResilientForm.builder.
ResilientFutureBuilder<T>
A widget that executes a Future-producing factory through a ResiliencePipeline and rebuilds based on the resulting ResilienceSnapshot.
ResilientInfiniteScroll<T>
A ListView with resilient infinite-scroll pagination.
ResilientListView<T>
A ListView that loads its items through a ResiliencePipeline and exposes loading / error / success states with pull-to-refresh support.
ResilientNetworkImage
A resilient network image widget that uses a ResiliencePipeline (retry + circuit breaker) before falling back to fallbackImageUrl or fallbackWidget.
ResilientRefreshIndicator
A RefreshIndicator wrapper that applies a ResiliencePipeline to the refresh callback and rate-limits rapid pull-to-refresh actions.
ResilientStreamBuilder<T>
A widget that subscribes to a Stream and automatically reconnects on error, applying a ResiliencePipeline to each re-subscription attempt.
RetryIndicatorOptions
Options that control retry indicator appearance.

Enums

ResilienceStatus
Represents the current status of a resilience operation.

Extensions

ResilienceSnapshotExtensions on ResilienceSnapshot<T>
Extensions on ResilienceSnapshot for convenient widget building.