auto_retry_future_builder 1.0.0
auto_retry_future_builder: ^1.0.0 copied to clipboard
A FutureBuilder with automatic retry functionality.
📌 AutoRetryFutureBuilder #
A custom FutureBuilder with automatic retry support in Flutter. It retries failed requests before showing an error.
🌟 Features #
✅ Automatic retry mechanism 🔄
✅ Configurable retry count and delay ⏳
✅ Custom UI for loading, success, and error states 🎨
✅ Simple and easy to use 📱
✅ Works across multiple platforms 🖥️📱
🛠 Platform Support #
| Platform | Supported |
|---|---|
| ✅ Android | ✅ Yes |
| ✅ iOS | ✅ Yes |
| ✅ Web | ✅ Yes |
| ✅ macOS | ✅ Yes |
| ✅ Windows | ✅ Yes |
| ✅ Linux | ✅ Yes |
📦 Getting Started #
Usage #
AutoRetryFutureBuilder(
future: fetchData,
retryCount: 3,
retryDelay: Duration(seconds: 2),
loadingBuilder: (context) => CircularProgressIndicator(),
errorBuilder: (context, error, retry) => Column(
children: [
Text('Error: $error'),
ElevatedButton(
onPressed: retry,
child: Text('Retry'),
),
],
),
builder: (context, data) => ListView.builder(
itemCount: data.length,
itemBuilder: (context, index) => ListTile(
title: Text(data[index]),
),
),
);
### 1️⃣ Installation
Add this package in your `pubspec.yaml` file:
```yaml
dependencies:
auto_retry_future_builder:
git:
url: https://github.com/Jsp9888/auto_retry_future_builder