Flutter Design Hacks Scroll Controller As An Animation Choreographer

Fred Grott
2 min readFeb 1, 2023

This is another thing that is not directly in the Flutter Docs, this is a way to use the scroll controller as a cheap choreographer.

The Shared Scaffold Hooks

The first step is to provide the correct hooks to the scroll controller. That requires both a scroll controller and listeners:

So now we can do things like forward and reverse animation upon the scroll direction for example animated alignment:

And the complete code is,

Scroll Direction

--

--