AnimateNavigationTrasitionDo constructor

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

Implementation

AnimateNavigationTrasitionDo(
    {required this.context,
    required this.childPage,
    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:
      _fadeInTransition();
      break;
    case AnimationType.slideRight:
      _slideRightTransition();
      break;
    case AnimationType.rotation:
      _rotationTransition();
      break;
    case AnimationType.scaleRotation:
      _scaleRotateTransition();
      break;
    case AnimationType.scale:
      _scaleTransition();
      break;
    case AnimationType.size:
      _sizeTransition();
      break;
    case AnimationType.slideLeft:
      _slideLeftTransition();
      break;
    case AnimationType.slideTop:
      _slideTopTraansition();
      break;
    case AnimationType.slideBottom:
      _slideBottomTransition();
      break;
  }
}