Viewing version 1.0.0. Open the latest package page.
retry
1.0.0Execute a function repeatedly until no exception is thrown
Readme
dart-retry
Execute a function repeatedly until no exception is thrown
Usage
import "package:retry/retry.dart";
import "dart:async";
Future connectFunction(){ ... }
Future main() async {
// Tries to connect to a database 6 times, waiting 10 seconds each time
final db = await retry(connectFunction);
}
Useful for waiting for a server to come up.
Changelog
Installing
export PUB_HOSTED_URL=https://pub.mirror.p-hatan.ir
flutter pub add 'retry:1.0.0'pubspec.yaml
name: retry
version: 1.0.0
author: Tim Kluge <timklge@gmail.com>
homepage: https://github.com/gwTumm/dart-retry
description: Execute a function repeatedly until no exception is thrown
dev_dependencies:
test: any
Version history
| Version | Published | Archive | SHA-256 |
|---|---|---|---|
| 1.0.0 | Cached · Upstream SHA-256 matched | Download | 4d918240…989abc |
| 2.0.0 | Cached · Upstream SHA-256 matched | Download | 08c6fa9b…31341a |
| 3.0.0 | Cached · Upstream SHA-256 matched | Download | 7dec5e83…6e25f7 |
| 3.0.0+1 | Cached · Upstream SHA-256 matched | Download | 0719943a…bfb1c9 |
| 3.0.1-null-safety.0 | Cached · Upstream SHA-256 matched | Download | dda0aaa6…110023 |
| 3.0.1 | Cached · Upstream SHA-256 matched | Download | 6d0cc7ca…811440 |
| 3.1.0-null-safety.0 | Cached · Upstream SHA-256 matched | Download | 64d27479…72da79 |
| 3.1.0 | Cached · Upstream SHA-256 matched | Download | 45dfeeba…afdbab |
| 3.1.1 | Cached · Upstream SHA-256 matched | Download | a8a1e475…ce7aea |
| 3.1.2 | Cached · Upstream SHA-256 matched | Download | 822e118d…ba7efc |
Dependencies
No direct dependencies declared.