tick method

void tick(
  1. int milliseconds,
  2. VoidCallback callback
)

Implementation

void tick(int milliseconds, VoidCallback callback) {
  _timer?.cancel();
  _running = true;
  _timer = Timer.periodic(Duration(milliseconds: milliseconds), (timer) {
    callback();
  });
}