RouteTransitions constructor

RouteTransitions({
  1. required BuildContext context,
  2. required Widget child,
  3. AnimationType? animation,
  4. Duration? duration = const Duration(milliseconds: 300),
  5. bool? replacement = false,
})

Implementation

RouteTransitions(
    {required this.context,
    required this.child,
    this.animation,
    this.duration = const Duration(milliseconds: 300),
    this.replacement = false}) {
  switch (animation) {
    case AnimationType.normal:
      _normalTransition();
    case AnimationType.fadeIn:
      _fadeInTransition();
    default:
      _normalTransition();
  }
}