Material Transitions in Flutter with the Animations Package
Sep 21 2021 Dart 2.13, Flutter, VS Code 1.59
Part 1: Material Transitions in Flutter with the Animations Package
5. Animate Screens with the SharedAxis Animation
This video was last updated on Sep 21 2021
The final transition provided by the animations library is the shared axis transition. It transitions elements based on the horizotal, vertical or the Z axis with a fade animation. Let’s replace the
FadeScaleTransition in the
main_page.dart file with it. Update your code to the following:
return SharedAxisTransition( child: child, animation: primaryAnimation, secondaryAnimation: secondaryAnimation, transitionType: SharedAxisTransitionType.horizontal, );
... transitionType: SharedAxisTransitionType.vertical, ...
... transitionType: SharedAxisTransitionType.scaled, ...
reverse: _selectedIndex == 0,