fadeInMoveInRightStickyBouncy method

Widget fadeInMoveInRightStickyBouncy({
  1. int delay = 0,
  2. double horizontalOffset = 50,
  3. int duration = 500,
  4. bool repeat = false,
  5. bool reverse = false,
  6. bool autoPlay = true,
  7. Curve? curve,
  8. void onInit(
    1. AnimationController
    )?,
})

Applies a fade-in, slide-left, and strong, "sticky" bounce from the right using Curves.elasticOut.

Implementation

Widget fadeInMoveInRightStickyBouncy(
        {int delay = 0,
        double horizontalOffset = 50,
        int duration = 500,
        bool repeat = false,
        bool reverse = false,
        bool autoPlay = true,
        Curve? curve,
        void Function(AnimationController)? onInit}) =>
    animate(
            delay: delay.milliSeconds,
            autoPlay: autoPlay,
            onInit: onInit,
            onPlay: (controller) {
              if (repeat) {
                controller.repeat(reverse: reverse);
              }
            })
        .fadeIn(
            duration: duration.milliSeconds,
            begin: 0,
            curve: curve ?? Curves.ease)
        .moveX(
            duration: duration.milliSeconds,
            begin: horizontalOffset,
            end: 0,
            curve: curve ?? Curves.ease)
        .then()
        .moveX(
            duration: duration.milliSeconds,
            begin: horizontalOffset,
            end: 0,
            curve: Curves.elasticOut);