animateWidgetWaveFlow method

Widget animateWidgetWaveFlow({
  1. int durationMs = 2000,
  2. bool repeat = true,
  3. bool animate = true,
})
  1. Wave Flow (Loop)

Implementation

Widget animateWidgetWaveFlow({
  int durationMs = 2000,
  bool repeat = true,
  bool animate = true,
}) {
  if (!animate) return this;
  return _baseAnimate(repeat: repeat, reverse: true)
      .moveY(
        begin: 0,
        end: -5,
        duration: durationMs.ms,
        curve: Curves.easeInOutSine,
      )
      .moveX(
        begin: -2,
        end: 2,
        duration: (durationMs * 0.75).toInt().ms,
        curve: Curves.easeInOutSine,
      );
}