animateListHelix method

Widget animateListHelix({
  1. required int index,
  2. int intervalMs = 60,
  3. int durationMs = 700,
  4. bool animate = true,
})
  1. Perspective Helix

Implementation

Widget animateListHelix({
  required int index,
  int intervalMs = 60,
  int durationMs = 700,
  bool animate = true,
}) {
  if (!animate) return this;
  return this
      .animate(delay: _getDelay(index, intervalMs).ms)
      .fadeIn(duration: 400.ms)
      .custom(
        begin: 1.2,
        end: 0,
        duration: durationMs.ms,
        curve: Curves.easeOutBack,
        builder:
            (_, v, c) => Transform(
              transform:
                  Matrix4.identity()
                    ..setEntry(3, 2, 0.0015)
                    ..rotateX(v)
                    ..setTranslationRaw(0.0, v * 50, 0.0),
              alignment: Alignment.center,
              child: c,
            ),
      );
}