FLUTTER ECOSYSTEM

polly_dart

A Dart port of Polly (.NET resilience library) providing strategies like Retry, Circuit Breaker, Timeout, Rate Limiter, Hedging, and Fallback.

Latest version
0.0.9
30-day downloads
731
Likes
34
Pub points
160

Package Overview

Selection guidance generated from public package information. For reference only.

Overview

Polly Dart is a Dart implementation of the popular .NET Polly library, offering robust resilience patterns for handling transient faults in network and service calls. It provides strategies such as Retry, Circuit Breaker, Timeout, Rate Limiter, Hedging, and Fallback to improve application stability under failure conditions. Designed for use with HTTP clients and remote services, it helps developers build fault-tolerant applications by gracefully managing failures and retries. The package supports all major platforms including Android, iOS, Web, macOS, Windows, and Linux.

Use cases
  • Handling unreliable network requests
  • Implementing retry logic for API calls
  • Protecting against server overload
  • Managing fallback responses during outages
  • Building resilient microservices clients
  • Reducing cascading failures in distributed systems
Key features
  • Retry policy with exponential backoff
  • Circuit breaker for automatic fail-fast
  • Timeout handling for long-running operations
  • Rate limiting to prevent overloading
  • Hedging to improve response time
  • Fallback mechanisms for graceful degradation
Suitable for
  • Developers building resilient Flutter apps
  • Teams using HTTP clients with unstable endpoints
  • Applications requiring fault tolerance
  • Backend integration with unreliable APIs
  • Real-time or mission-critical services
Considerations
  • Requires understanding of resilience patterns
  • May increase latency due to retry logic
  • Needs proper configuration tuning
  • Not a replacement for backend error handling
  • Best used with async/await or Future-based workflows
Supported platformsAndroidiOSWebmacOSWindowsLinux

Install package

flutter pub add polly_dart

Categories

Related projects

No data available yet.