I have animations working and a Timer. I understand that the Timer is the best way to get the Second Ticks ticking at exactly the second mark. For Animations I have used both AnimationController and the Timer with a small duration time (100ms). I think I must be missing something in that I don't completely understand when a Timer and AnimationController should each be used. They both cause a setState() and thus a Build(and thus redraw). I suppose one idea is if I could retain all the screen, and just redraw a small change in an animation. full disclosure: I am working on the Flutter Clock Challenge!!!
Timer is unrelated to Flutter, and is just a timer like you'd fine in any other language.
On the other hand, AnimationController (and Ticker, its equivalent of Timer) is Flutter specific.
The difference with a Timer is that, by using AnimationController, the "ticker" can be muted, slowed, or mocked.
As such, using AnimationController we have a few benefits:
vsync arg is used for)If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With