I am trying to build a countdown widget. Currently, I got the structure to work. I only struggle with the countdown itself. I tried this approach using the countdown plugin:
based on @raju-bitter answer, alternative to use async/await on countdown stream
void countdown() async { cd = new CountDown(new Duration(seconds:4)); await for (var v in cd.stream) { setState(() => val = v.inSeconds); } }