buildTransitions<T> method
- PageRoute<
T> route, - BuildContext context,
- Animation<
double> animation, - Animation<
double> secondaryAnimation, - Widget child,
override
Wraps the child with one or more transition widgets which define how route
arrives on and leaves the screen.
The MaterialPageRoute.buildTransitions method looks up the
current PageTransitionsTheme with Theme.of(context).pageTransitionsTheme
and delegates to this method with a PageTransitionsBuilder based
on the theme's ThemeData.platform.
Implementation
@override
Widget buildTransitions<T>(
PageRoute<T> route,
BuildContext context,
Animation<double> animation,
Animation<double> secondaryAnimation,
Widget child,
) {
if (_kProfileForceDisableSnapshotting) {
return _ZoomPageTransitionNoCache(
animation: animation,
secondaryAnimation: secondaryAnimation,
child: child,
);
}
return _ZoomPageTransition(
animation: animation,
secondaryAnimation: secondaryAnimation,
allowSnapshotting: allowSnapshotting && route.allowSnapshotting,
allowEnterRouteSnapshotting: allowEnterRouteSnapshotting,
backgroundColor: backgroundColor,
child: child,
);
}