Jul 19, 2023
Nice parallax effect !
I'm not sure if you can improve this, but what's about using SliverRenderObject ?
They tipically achieve that purpose (draw a widget given the scroll offset).
You may found an implementation already made in SliverAppBar (or other Sliver widget) 😉
Using sliver render object will enhance your code, as widgets may not be rebuild. But Sliver render object will paint each frame until it determines that the widget is no more visible...