Page Transitions


AutoRoute provides an easy way to declare custom transitions between pages. Just add your transition to the transitionsBuilder field of your route

...
CustomRoute(
    path: '', 
    page: BooksPage,
    transitionsBuilder: SlideTransition(
        position: Tween<Offset>(
          begin: const Offset(0.0, -1.0),
          end: Offset.zero,
        ).animate(animation),
        child: child, 
    );
)
...

You can also pick from the several pre-built transitions that ship with AutoRoute! For example, the above example can be re-written like so
...
CustomRoute(
    path: '', 
    page: BooksPage,
    transitionsBuilder: TransitionsBuilders.slideTop
)
...

If you don't want any transitions, use CustomRoute and leave transitionsBuilder to be empty