wait_completer 0.0.2
wait_completer: ^0.0.2 copied to clipboard

wait completer

wait_completer #

Future can handle cancelable wait utility

Usage #


final completer = WaitCompleter(duration: Duration(milliseconds: 2000));
main() async {
  Timer(Duration(milliseconds: 1000), ()=> completer.cance());
  final result = await completer.start();
  if(result == WaitCompleterStatus.complete) {
    print('complete');
  }
  else if(result == WaitCompleterStatus.canceled) {
    print('canceled');
  }
}

Getting Started #

This project is a starting point for a Dart package, a library module containing code that can be shared easily across multiple Flutter or Dart projects.

For help getting started with Flutter, view our online documentation, which offers tutorials, samples, guidance on mobile development, and a full API reference.

0
likes
80
pub points
0%
popularity

Publisher

Unknown

wait completer

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (LICENSE)

Dependencies

flutter

More

Packages that depend on wait_completer