call method
dynamic
call(
- void callback()
Implementation
call(void Function() callback) {
if (_isDisposed) {
throw IllegalStateException(
message: 'Can\'t call debouncer after dispose.',
);
}
_currentCallback = callback;
_isPending = true;
_timer?.cancel();
_timer = Timer(delay, () {
callback();
_isPending = false;
});
}