buildTransition abstract method

Widget buildTransition(
  1. BuildContext context,
  2. Curve? curve,
  3. Alignment? alignment,
  4. Animation<double> animation,
  5. Animation<double> secondaryAnimation,
  6. Widget child,
)

Builds the transition animation for a route.

This method should be implemented to define the transition animation for a route.

  • context: The build context.
  • curve: The curve to be used for the animation.
  • alignment: The alignment of the transition animation.
  • animation: The animation controlling the transition.
  • secondaryAnimation: The animation controlling the transition of secondary elements.
  • child: The child widget to be transitioned.

Returns the widget representing the transition animation.

Implementation

Widget buildTransition(
  BuildContext context,
  Curve? curve,
  Alignment? alignment,
  Animation<double> animation,
  Animation<double> secondaryAnimation,
  Widget child,
);