Viewing version 1.0.0. Open the latest package page.

retry

1.0.0

Execute a function repeatedly until no exception is thrown

Download archive

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

VersionPublishedArchiveSHA-256
1.0.0Cached · Upstream SHA-256 matchedDownload4d918240…989abc
2.0.0Cached · Upstream SHA-256 matchedDownload08c6fa9b…31341a
3.0.0Cached · Upstream SHA-256 matchedDownload7dec5e83…6e25f7
3.0.0+1Cached · Upstream SHA-256 matchedDownload0719943a…bfb1c9
3.0.1-null-safety.0Cached · Upstream SHA-256 matchedDownloaddda0aaa6…110023
3.0.1Cached · Upstream SHA-256 matchedDownload6d0cc7ca…811440
3.1.0-null-safety.0Cached · Upstream SHA-256 matchedDownload64d27479…72da79
3.1.0Cached · Upstream SHA-256 matchedDownload45dfeeba…afdbab
3.1.1Cached · Upstream SHA-256 matchedDownloada8a1e475…ce7aea
3.1.2Cached · Upstream SHA-256 matchedDownload822e118d…ba7efc

Dependencies

No direct dependencies declared.