flutter_debounce_throttle_hooks 2.4.6
flutter_debounce_throttle_hooks: ^2.4.6 copied to clipboard
Debounce and throttle hooks for Flutter. useDebouncer, useThrottler, useDebouncedValue — auto-dispose with HookWidget. Zero boilerplate.
flutter_debounce_throttle_hooks #
The Traffic Control System — Hooks Edition #
No dispose. No initState. No boilerplate. Just hooks.

All the power of flutter_debounce_throttle — debounce, throttle, async cancellation, race condition control — with automatic lifecycle management the hooks way.
class SearchWidget extends HookWidget {
Widget build(BuildContext context) {
// ✅ One line. Auto-cleanup on unmount. Zero boilerplate.
final debouncedSearch = useDebouncedCallback<String>(
(text) => api.search(text),
duration: 300.ms,
);
return TextField(onChanged: debouncedSearch);
}
}
Why Hooks? #
| Capability | StatefulWidget | Hooks Edition |
|---|---|---|
| Memory Safe (Auto-dispose) | ✅ (Manual) | ✅ Automatic |
| Async Support | ✅ | ✅ |
| Boilerplate Lines | 15+ | 1 |
| Logic Reuse | ❌ Difficult | ✅ High |
5-Second Start #
Debounced Search:
final debouncedSearch = useDebouncedCallback<String>(
(text) => api.search(text),
duration: 300.ms,
);
TextField(onChanged: debouncedSearch)
Throttled Button:
final throttledSubmit = useThrottledCallback(
() => submitForm(),
duration: 500.ms,
);
ElevatedButton(onPressed: throttledSubmit, child: Text('Submit'))
Quality Assurance #
| Guarantee | How |
|---|---|
| 570+ tests | Built on battle-tested core (100% verified) |
| Type-safe | Full generic support for all 8 production-ready hooks |
| Memory-safe | Automatic cleanup on unmount |
| Battle-tested | Zero boilerplate, zero leaks |
Which Package? #
| You are building... | Package |
|---|---|
| Flutter app + hooks | flutter_debounce_throttle_hooks ← you are here |
| Flutter app (no hooks) | flutter_debounce_throttle |
| Dart server / CLI / Serverpod | dart_debounce_throttle |
GitHub · FAQ · API Reference
Made with craftsmanship by Brewkits