PageTransitionSwitcherTransitionBuilder typedef
PageTransitionSwitcherTransitionBuilder =
Widget Function(Widget child, Animation<double> primaryAnimation, Animation<double> secondaryAnimation)
Signature for builders used to generate custom transitions for PageTransitionSwitcher.
The function should return a widget which wraps the given child
.
When a PageTransitionSwitcher's child
is replaced, the new child's
primaryAnimation
runs forward and the value of its secondaryAnimation
is
usually fixed at 0.0. At the same time, the old child's secondaryAnimation
runs forward, and the value of its primaryAnimation is usually fixed at 1.0.
The widget returned by the PageTransitionSwitcherTransitionBuilder can incorporate both animations. It will use the primary animation to define how its child appears, and the secondary animation to define how its child disappears.
Implementation
typedef PageTransitionSwitcherTransitionBuilder = Widget Function(
Widget child,
Animation<double> primaryAnimation,
Animation<double> secondaryAnimation,
);