I need to refresh the duration of my CircularCountDownTimer() more than one time.
child: CircularCountDownTimer(
width: MediaQuery.of(context).size.width / 2,
height: MediaQuery.of(context).size.height / 2,
duration: _duration,
fillColor: _fillColor,
ringColor: Colors.green,
controller: _controller,
backgroundColor: Colors.white54,
strokeWidth: 50.0,
strokeCap: StrokeCap.butt,
isTimerTextShown: true,
isReverse: true,
onComplete: () {
setState(() {
_fillColor = Colors.purple;
_controller.restart(duration: 90); // here I update the duration, but I need to update it one more time.
});
},
textStyle: TextStyle(fontSize: 50.0, color: Colors.black),
),