RouteTransitions constructor
RouteTransitions({
- required BuildContext context,
- required Widget child,
- bool replacement = false,
- AnimationType animation = AnimationType.normal,
- Duration duration = const Duration(milliseconds: 300),
- Alignment alignment = Alignment.topLeft,
Implementation
RouteTransitions({
required this.context,
required this.child,
this.replacement = false,
this.animation = AnimationType.normal,
this.duration = const Duration(milliseconds: 300),
this.alignment = Alignment.topLeft,
}) {
switch (animation) {
case AnimationType.normal:
_normalTransition();
break;
case AnimationType.fadeIn:
_fadeInTransition();
break;
case AnimationType.fadeInUp:
_fadeInUpTransition();
break;
case AnimationType.fadeInRight:
_fadeInRightTransition();
break;
case AnimationType.fadeInLeft:
_fadeInLeftTransition();
break;
case AnimationType.fadeInDown:
_fadeInDownTransition();
break;
case AnimationType.rotateIn:
_rotateInTransition();
break;
}
}