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 fn after delay of 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 fn never fires after teardown and the Timer does not leak. Audited: 2026-06-13

Typedefs

VoidCallback = void Function()
Callback with no arguments.