startTimer method
void
startTimer()
启动倒计时的计时器。
Implementation
void startTimer() {
if(widget.enableCancel){
if(_timer!=null){
cancelTimer();
}
}
if(_timer!=null){
return;
}
_timer = Timer.periodic(widget.duration, (timer) {
if (_currentTime == 1) {
cancelTimer();
}
_currentTime = widget.countdown - timer.tick;
notyChange();
});
}