SwipeablePageTransition constructor

SwipeablePageTransition({
  1. Key? key,
  2. required Widget child,
  3. required Animation<double> primaryRouteAnimation,
  4. required SlidingState slidingState,
  5. required Animation<double> secondaryRouteAnimation,
  6. required bool linearTransition,
})

Implementation

SwipeablePageTransition({
  Key? key,
  required this.child,
  required this.primaryRouteAnimation,
  required this.slidingState,
  required Animation<double> secondaryRouteAnimation,
  required bool linearTransition,
})  : _secondaryPositionAnimation = (linearTransition
              ? secondaryRouteAnimation
              : CurvedAnimation(
                  parent: secondaryRouteAnimation,
                  curve: Curves.linearToEaseOut,
                  reverseCurve: Curves.easeInToLinear,
                ))
          .drive(_kMiddleBottomTween),
      super(key: key);