We have our AnimationController and rectAnimation which will animate from the selected grid image to the same page image. Depending on the direction (from the grid to a page or from page to grid) we decide if we should run forward() or reverse() . But animation itself won’t make any difference if we don’t use it to build Widgets. To do that we will use Overlay .

The overlay is a handy Widget if we want our Widgets to float on top of others. It has its own Stack, in which we can put OverlayEntries . Our OverlayEntry will be simple widget wrapped in AnimatedBuilder so that it is built every time our animation changes. Inside that, we will have an Image wrapped in Positioned . We only need to also make sure that the image’s position and size are dependent on the current rectAnimation value. The code looks like this: