async/debounce_utils library
Classes
- CancelableCallback
- A scheduled callback that is invoked like a function and can also be cancelled.
Functions
-
debounce(
VoidCallback fn, Duration delay) → VoidCallback -
Debounce (time) — invokes
fnafterdelayof no further calls. Roadmap #176. -
debounceCancelable(
VoidCallback fn, Duration delay) → CancelableCallback -
Like debounce, but returns a CancelableCallback so a pending invocation
can be dropped via CancelableCallback.cancel — call it on dispose so
fnnever fires after teardown and theTimerdoes not leak. Audited: 2026-06-13
Typedefs
- VoidCallback = void Function()
- Callback with no arguments.