startTimer method

void startTimer()

start Timer. 启动定时Timer.

Implementation

void startTimer() {
  if (_isActive || mInterval <= 0) return;
  _isActive = true;
  Duration duration = Duration(milliseconds: mInterval);
  _doCallback(0);
  _mTimer = Timer.periodic(duration, (Timer timer) {
    _doCallback(timer.tick);
  });
}