debounce function
TopLevel lambda to create Debounce functions.
Implementation
Debounce debounce(
Function func,
Duration wait, {
bool leading = false,
bool trailing = true,
Duration? maxWait,
}) =>
Debounce(
func,
wait,
leading: leading,
trailing: trailing,
maxWait: maxWait,
);