call method
void
call(
- dynamic callback()
Execute a function with debouncing If called again before the duration expires, the previous call is cancelled
Implementation
void call(Function() callback) {
// Cancel any pending timer
_timer?.cancel();
// Schedule the callback to run after the duration
_timer = Timer(duration, callback);
}