Zero to One with Flutter
Mikkel Ravn
1765

Hi, and thank you for this very interesting article!

I have one question, though — it may actually be more about Dart syntax than about Flutter Tweens, but I am not sure. And since my understanding of your article depends on it, I hope you are OK with me asking here:

How and why is BarCharPainer.paint triggered? I followed the code around enough to understand that the Animation<Bar> is passed to the constructor of CustomPainter and there’s a comment there that says that “The painter will repaint whenever [repaint] notifies its listeners.” But I can’t see any place where CustomPainter would actually add itself as a listener; neither do I find any place where paint is explicitly called…

I know it must be something trivial about how Dart works but I’d very much appreciate any help!

Show your support

Clapping shows how much you appreciated David Mihola’s story.