animateListGlitch method

Widget animateListGlitch({
  1. required int index,
  2. int intervalMs = 50,
  3. int durationMs = 400,
  4. bool animate = true,
})
  1. Glitch & Slide

Implementation

Widget animateListGlitch({
  required int index,
  int intervalMs = 50,
  int durationMs = 400,
  bool animate = true,
}) {
  if (!animate) return this;
  return this
      .animate(delay: _getDelay(index, intervalMs).ms)
      .fadeIn(duration: 300.ms)
      .shake(hz: 4, duration: durationMs.ms, curve: Curves.easeInOut)
      .slideX(
        begin: 0.1,
        end: 0,
        curve: Curves.decelerate,
        duration: durationMs.ms,
      );
}