Debounce constructor
Debounce(})
Creates a new instance of Debounce.
Implementation
Debounce(
this._func,
Duration wait, {
bool leading = false,
bool trailing = true,
Duration? maxWait,
}) : _leading = leading,
_trailing = trailing,
_wait = wait.inMilliseconds,
_maxing = maxWait != null {
if (_maxing) {
_maxWait = math.max(maxWait!.inMilliseconds, _wait);
}
}