FlutterCountdownTimer icon indicating copy to clipboard operation
FlutterCountdownTimer copied to clipboard

Added method to restart timer to CountdownController

Open acyment opened this issue 4 years ago • 2 comments

Hi! I don't fully understand why you have both Countdown and CountdownTimer. I used the former because I needed to pause the timer. I added a method to also restart it. Thanks!

acyment avatar May 11 '21 13:05 acyment

Hello, thank you very much for submitting your PR. I think this will also restart the timer,Is there any difference between this and your reset?

   countdownController.value = Duration(seconds: 5).inMilliseconds;
   countdownController.start();

wuweijian1997 avatar May 12 '21 11:05 wuweijian1997

Sorry for not answering before. Both alternatives work, but I just found this interface to be a bit more encapsulated, but it's very subjective.

acyment avatar Jun 05 '21 00:06 acyment