RouteTransitions constructor

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

Implementation

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