Skip to content
pubscout

debounce_throttle

2.0.0, released 6 years ago by defylogic.dev

A debouncer and throttle for Futures, Streams, and callbacks.

WASM-readySingle maintainer
$ flutter pub add debounce_throttle
Source repository

What it does

Provides Debouncer and Throttle classes that limit how often values are emitted. Works with plain callbacks, Futures and Stream sources. Emits debounced or throttled values via a broadcast stream.

AI-written summary of version 2.0.0, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You need to limit rapid user input such as search queries
  • You want to reduce noise from high‑frequency sensor data

Skip it when

  • You need full‑featured reactive operators beyond debounce/throttle
  • You require code‑generation or complex state‑management

Strengths

  • Null‑safe and lightweight
  • Works with multiple async patterns (Future, Stream, callbacks)
  • Simple API with broadcast streams

Weaknesses

  • Only provides basic debounce/throttle functionality
  • No built‑in cancellation or pause control
  • No integration with larger reactive libraries

Setup

Kind
Pure Dart
Effort
Low
Code generation
No
Direct dependencies
2
final debouncer = Debouncer<String>(Duration(milliseconds:200));
textEditingController.addListener(() => debouncer.value = textEditingController.text);
debouncer.values.listen((search) => submitSearch(search));

Alternatives

Packages that do the same job and could replace debounce_throttle.

  • async

    Provides similar debounce utilities without extra dependencies

Works with

Packages commonly used together with debounce_throttle: ones it builds on, ones built on it, and its own family.