call method

void call(
  1. void action()
)

Executes the function after the delay, canceling any pending execution

Implementation

void call(void Function() action) {
  _timer?.cancel();
  _timer = Timer(delay, action);
}