animateListBounce method

Widget animateListBounce({
  1. required int index,
  2. int intervalMs = 50,
  3. int durationMs = 800,
  4. bool animate = true,
})
  1. Bounce Up

Implementation

Widget animateListBounce(
    {required int index,
    int intervalMs = 50,
    int durationMs = 800,
    bool animate = true}) {
  if (!animate) return this;
  return this
      .animate(delay: _getDelay(index, intervalMs).ms)
      .scale(
          begin: const Offset(0.3, 0.3),
          end: const Offset(1, 1),
          curve: Curves.bounceOut,
          duration: durationMs.ms)
      .fadeIn(duration: (durationMs / 2).toInt().ms);
}