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

Contain "throttling" and "debouncing" async helper classes with listeners

THROTTLING DART LIBRARY #

contain "throttling" and "debouncing" classes

Actions Status Coverage Pub License: MIT Effective Dart Star on Github

Using #

See demonstration of use on the dartpad.dartlang.org

Throttling example #

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

Debouncing example #

final deb = Debouncing(duration: const Duration(seconds: 2));
deb.debounce(() {print(' * ping #1');});
await Future<void>.delayed(const Duration(seconds: 1));
deb.debounce(() {print(' * ping #2');});
await Future<void>.delayed(const Duration(seconds: 1));
deb.debounce(() {print(' * ping #3');});
await deb.close();
40
likes
140
pub points
93%
popularity

Publisher

verified publisherplugfox.dev

Contain "throttling" and "debouncing" async helper classes with listeners

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

More

Packages that depend on throttling