defaultTransition top-level property

CustomTransition defaultTransition
final

The default page transition for the application.

Usage:

r.module(
 '/my-module',
  module: MyModule(),
  customTransition: defaultTransition,
  transition: TransitionType.custom,
);

r.child(
  '/my-child',
   child: (_) => const MyChild(),
   customTransition: defaultTransition,
   transition: TransitionType.custom,
);

Implementation

final defaultTransition = CustomTransition(
  transitionBuilder: (context, animation, secondaryAnimation, child) {
    return SharedAxisTransition(
      transitionType: SharedAxisTransitionType.vertical,
      animation: animation,
      secondaryAnimation: secondaryAnimation,
      fillColor: Colors.transparent,
      child: child,
    );
  },
);