smladeoye / flutter-simple-timer

A Simple Flutter Timer Widget with various customizable features.
MIT License
19 stars 7 forks source link

set duration and start from another time #1

Closed alirezat66 closed 4 years ago

alirezat66 commented 4 years ago

how can set duration for example 30 s , then start from 20 second? I want use a button to add some time to my countdown timer. for example I start with 45 and then, when I am in 20 second remind, I add 15 second, So duration should be 45 and remind time should be 35, how can do this. thanks for your reply.

smladeoye commented 4 years ago

Hi, a new update has been made to make this more convenient. You can now call the add or subtract method of the TimerController. In your case you simply call the add method like below:

_timerController.add(Duration(seconds: 15))