How can I yield
a state from the recurring callback of a Timer
?
I have a Timer object in my class and when user hits start, a new object of it is created, and inside it's callback I need to call yield ...
.
This is the code I have so far, but it's not doing anything:
if (event is CounterETimerStart) {
timer = Timer.periodic(Duration(seconds: 1), (timer) async* {
yield CounterNewSecond(++m.passedTime);
});
}