call method

void call(
  1. VoidCallback action
)

Implementation

void call(VoidCallback action) {
  _timer?.cancel(); // Cancel previous timer
  _action = action;
  _timer = Timer(delay, () {
    _action?.call();
  });
}