Hey there, in this blog we are going to see how you can implement an animated page transition to your Flutter App routes/pages.
Lets first see what are you going to get at the end —
First you need to know that in Flutter Page Routes are categorised into 3 divisions —
- Cupertino Page Route (iOS)
- Material Page Route
- Page Route Builder
For customising the transitions from one page to another , we use Page Route Builder which take 3 properties —
- pageBuilder — It defines the what the Route Builder needs to return after the animaion
- transitionDuration — Duration of the transition.
- transitionBuilder — For defining the animation type, we will use CurvedAnimation curve in this article
So, when you press the RaisedButton of the first page, it activates the PageRouteBuilder and calls the Scale Transition which implements the elasticInOut Curved Animation.
Thanks for reading…..