CustomTransitionPage<T> constructor

const CustomTransitionPage<T>({
  1. required Widget child,
  2. required Widget transitionsBuilder(
    1. BuildContext context,
    2. Animation<double> animation,
    3. Animation<double> secondaryAnimation,
    4. Widget child,
    ),
  3. Duration transitionDuration = const Duration(milliseconds: 300),
  4. Duration reverseTransitionDuration = const Duration(milliseconds: 300),
  5. bool maintainState = true,
  6. bool fullscreenDialog = false,
  7. bool opaque = true,
  8. bool barrierDismissible = false,
  9. Color? barrierColor,
  10. String? barrierLabel,
  11. LocalKey? key,
  12. String? name,
  13. Object? arguments,
  14. String? restorationId,
})

Constructor for a page with custom transition functionality.

To be used instead of MaterialPage or CupertinoPage, which provide their own transitions.

Implementation

const CustomTransitionPage({
  required this.child,
  required this.transitionsBuilder,
  this.transitionDuration = const Duration(milliseconds: 300),
  this.reverseTransitionDuration = const Duration(milliseconds: 300),
  this.maintainState = true,
  this.fullscreenDialog = false,
  this.opaque = true,
  this.barrierDismissible = false,
  this.barrierColor,
  this.barrierLabel,
  super.key,
  super.name,
  super.arguments,
  super.restorationId,
});