Create multiple timers at the same time, display exception
The previous timer will reset the time, and the next one will inherit the remaining time of the previous one
Widget _timerCountDown() {
return Countdown(
// controller: timerController,
seconds: 120,
build: (BuildContext context, double time) {
if (time < 5.0) {
return Text("ღ( ´・ᴗ・` )",style: TextStyle(color: Colors.white),);
}else{
return Text(time.toString(),style: TextStyle(color: Colors.white),);
}
},
interval: Duration(milliseconds: 100),
onFinished: () {
print('Timer is done!');
},
);
}
Create multiple timers at the same time, display exception
The previous timer will reset the time, and the next one will inherit the remaining time of the previous one