animateListLiquidSwipe method

Widget animateListLiquidSwipe({
  1. required int index,
  2. int intervalMs = 50,
  3. int durationMs = 600,
  4. bool animate = true,
})
  1. Liquid Swipe

Implementation

Widget animateListLiquidSwipe(
    {required int index,
    int intervalMs = 50,
    int durationMs = 600,
    bool animate = true}) {
  if (!animate) return this;
  return this
      .animate(delay: _getDelay(index, intervalMs).ms)
      .fadeIn(duration: 400.ms)
      .custom(
        begin: 1.0,
        end: 0,
        duration: durationMs.ms,
        curve: Curves.easeInOutQuart,
        builder: (_, v, c) => Transform(
          transform: Matrix4.identity()
            ..setEntry(3, 2, 0.002)
            ..setEntry(0, 1, v * 0.3)
            ..setTranslationRaw(v * 200, 0.0, 0.0),
          child: c,
        ),
      );
}