animateWidgetNeonPulse method

Widget animateWidgetNeonPulse({
  1. Color color = Colors.blue,
  2. int durationMs = 1500,
  3. bool repeat = true,
  4. bool animate = true,
})
  1. Neon Pulse (Breathe)

Implementation

Widget animateWidgetNeonPulse({
  Color color = Colors.blue,
  int durationMs = 1500,
  bool repeat = true,
  bool animate = true,
}) {
  if (!animate) return this;
  return _baseAnimate(repeat: repeat, reverse: true).custom(
    duration: durationMs.ms,
    builder:
        (_, v, c) => Container(
          decoration: BoxDecoration(
            boxShadow: [
              BoxShadow(
                color: color.withColorOpacity(0.3 * v),
                blurRadius: 20 * v,
                spreadRadius: 2 * v,
              ),
            ],
          ),
          child: c,
        ),
  );
}