animateWidgetHelixEntry method

Widget animateWidgetHelixEntry({
  1. int delayMs = 0,
  2. int durationMs = 700,
  3. bool repeat = false,
  4. bool animate = true,
})
  1. Helix Spin Entrance

Implementation

Widget animateWidgetHelixEntry(
    {int delayMs = 0,
    int durationMs = 700,
    bool repeat = false,
    bool animate = true}) {
  if (!animate) return this;
  return _baseAnimate(delayMs: delayMs, repeat: repeat)
      .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)
            ..translateByDouble(0.0, v * 50, 0.0, 1),
          alignment: Alignment.center,
          child: c,
        ),
      );
}