poller 1.0.0 copy "poller: ^1.0.0" to clipboard
poller: ^1.0.0 copied to clipboard

discontinuedreplaced by: async
outdated

A custom poller for Flutter apps to use to periodically poll for information.

poller #

A custom poller for Flutter apps to use to periodically execute a function.

Getting Started #

Use this package as a library

1. Depend on it #

Add this to your package's pubspec.yaml file:

dependencies:
  poller: ^1.0.0

2. Install it #

You can install packages from the command line:

with pub:

$ pub get

with Flutter:

$ flutter pub get

Alternatively, your editor might support pub get or flutter pub get. Check the docs for your editor to learn more.

3. Import it #

Now in your Dart code, you can use:

import 'package:poller/poller.dart';

Usage #

Create a poller. Start it. If desired, pause, resume, or stop it altogether. You can also check on its status to see if it is paused or stopped.

import 'package:poller/poller.dart';

final Poller poller = new Poller(seconds: 3, callback: () {
  // callback function
});

poller.start();

poller.pause();

poller.resume();

poller.stop();

if (poller.isPaused) {
  // poller is paused
}

if (poller.isStopped) {
  // poller is stopped
}
0
likes
0
points
7
downloads

Publisher

unverified uploader

Weekly Downloads

A custom poller for Flutter apps to use to periodically poll for information.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter

More

Packages that depend on poller