animateList3DSwing method

Widget animateList3DSwing({
  1. required int index,
  2. int intervalMs = 80,
  3. int durationMs = 800,
  4. bool animate = true,
})
  1. 3D Swing

Implementation

Widget animateList3DSwing({
  required int index,
  int intervalMs = 80,
  int durationMs = 800,
  bool animate = true,
}) {
  if (!animate) return this;
  return this
      .animate(delay: _getDelay(index, intervalMs).ms)
      .custom(
        begin: -0.5,
        end: 0,
        duration: durationMs.ms,
        curve: Curves.easeOutBack,
        builder:
            (_, v, c) => Transform(
              transform:
                  Matrix4.identity()
                    ..setEntry(3, 2, 0.001)
                    ..rotateY(v),
              alignment: Alignment.centerLeft,
              child: c,
            ),
      )
      .fadeIn();
}