flutter_throttling 1.0.1 copy "flutter_throttling: ^1.0.1" to clipboard
flutter_throttling: ^1.0.1 copied to clipboard

contain "throttling" and "debouncing" async helper classes with listeners for flutter

FORKED FROM https://github.com/PlugFox/throttling #

THROTTLING DART LIBRARY #

contain "throttling" and "debouncing" classes

pub package

Using #

See demonstration of use on the dartpad.dartlang.org

Throttling example #

final Throttling thr = new Throttling(duration: Duration(seconds: 2));
thr.throttle(() {print(' *ping #1');});
await Future.delayed(Duration(seconds: 1));
thr.throttle(() {print(' *ping #2');});
await Future.delayed(Duration(seconds: 1));
thr.throttle(() {print(' *ping #3');});

Debouncing example #

final Debouncing deb = new Debouncing(duration: Duration(seconds: 2));
deb.debounce(() {print(' *ping #1');});
await Future.delayed(Duration(seconds: 1));
deb.debounce(() {print(' *ping #2');});
await Future.delayed(Duration(seconds: 1));
deb.debounce(() {print(' *ping #3');});
0
likes
130
points
28
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

contain "throttling" and "debouncing" async helper classes with listeners for flutter

Homepage

License

MIT (license)

More

Packages that depend on flutter_throttling