Animate a widget using a physics simulation

Animate a page route transition

Cookbook

Animation

Animate a page route transition

1. Set up a PageRouteBuilder

2. Create a Tween

3. Use an AnimatedWidget

4. Use a CurveTween

5. Combine the two Tweens

Interactive example

A design language, such as Material, defines standard behaviors when
transitioning between routes (or screens). Sometimes, though, a custom
transition between screens can make an app more unique. To help,
PageRouteBuilder provides an Animation object.
This Animation can be used with Tween and
Curve objects to customize the transition animation.
This recipe shows how to transition between
routes by animating the new route into view from
the bottom of the screen.

To create a custom page route transition, this recipe uses the following steps: