fadeTransition top-level property

RouteTransitionsBuilder fadeTransition
final

Implementation

final RouteTransitionsBuilder fadeTransition = (
  BuildContext context,
  Animation<double> animation,
  Animation<double> secondaryAnimation,
  Widget child,
) {
  Widget appear = FadeTransition(
    opacity: Tween<double>(
      begin: 0.0,
      end: 1.0,
    ).animate(animation),
    child: child, // child is the value returned by pageBuilder
  );

  Widget disappear = FadeTransition(
    opacity: Tween<double>(
      begin: 1.0,
      end: 0.0,
    ).animate(secondaryAnimation),
    child: appear,
  );
  return disappear;
};