transitionBuilder method
Widget
transitionBuilder(
- BuildContext context,
- Animation<
double> animation, - Animation<
double> secondaryAnimation, - Widget child,
override
A builder that defines how the route arrives on and leaves the screen.
The buildTransitions
method is typically used to define transitions
that animate the new topmost route's comings and goings. When the
Navigator pushes a route on the top of its stack, the new route's
primary animation
runs from 0.0 to 1.0. When the Navigator pops the
topmost route, e.g. because the use pressed the back button, the
primary animation runs from 1.0 to 0.0.
Implementation
@override
Widget transitionBuilder(
BuildContext context,
Animation<double> animation,
Animation<double> secondaryAnimation,
Widget child,
) {
return FadeScaleTransition(
animation: animation,
child: child,
);
}