animateListBounce method
Widget
animateListBounce(
{ - required int index,
- int intervalMs = 50,
- int durationMs = 800,
- bool animate = true,
})
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);
}