call method

void call(
  1. void action()
)

Implementation

void call(void Function() action) {
  if (_timer?.isActive ?? false) cancel();

  _timer = Timer(delay, action);
}