p-hatan/ mirror

pub repository

mirror.p-hatan.com

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.com
flutter pub add retry
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.02016-03-31T16:47:45.053ZDownload4d918240ea6fba89e4aaf814a7a6b40f9f72998ed04780db32d53a8f64989abc
2.0.02019-03-22T14:21:00.391587ZDownload08c6fa9b59f216fb32259ffa7e4b0a5ed921777218760e4c3918e4d75a31341a
3.0.02019-06-20T18:34:40.073842ZDownload7dec5e833bf587c0997c882b8ad46e5a0b69e68055817a738275691b556e25f7
3.0.0+12019-08-26T08:37:44.221096ZDownload0719943a7d596ee6ba9e53e5cff853ab276dd7125848f890e2853aebf8bfb1c9
3.0.1-null-safety.02020-11-02T13:46:25.148871ZDownloaddda0aaa6d66fdba3d27c3954a3326f4e4848f96eadf2ab81023324c178110023
3.0.12020-07-01T17:29:53.216548ZDownload6d0cc7caba6caa8a16bbb7b6d79a5328e708940541090bcbebe844d4e0811440
3.1.0-null-safety.02020-12-02T20:55:00.012653ZDownload64d274790adfd9e46b704459b91b2babde2ceeb3f7fa72327519998e3972da79
3.1.02021-03-01T18:27:00.565009ZDownload45dfeebaf095b606fdb9dbfb4c114cc204449bc274783b452658365e03afdbab
3.1.12023-03-27T09:18:10.201498ZDownloada8a1e475a100a0bdc73f529ca8ea1e9c9c76bec8ad86a1f47780139a34ce7aea
3.1.22023-05-16T14:26:11.159498ZDownload822e118d5b3aafed083109c72d5f484c6dc66707885e07c0fbcb8b986bba7efc

Dependencies

No direct dependencies declared.