RouteTransitions constructor
RouteTransitions({
- required BuildContext context,
- required Widget child,
- Duration duration = const Duration(milliseconds: 500),
- AnimationType animation = AnimationType.normal,
- bool replacement = false,
Constructor of main class context contex of app child Target Widget duration animation effect duration animation animation type available replacement determines the push for the route
Implementation
RouteTransitions({
required this.context,
required this.child,
this.duration = const Duration(milliseconds: 500),
this.animation = AnimationType.normal,
this.replacement = false,
}) {
/// Type of animation to run
switch (animation) {
case AnimationType.normal:
_normalTransition();
break;
case AnimationType.fadeIn:
_fadeInTransition();
break;
}
}