animateWidgetBorderGlow method

Widget animateWidgetBorderGlow({
  1. Color color = Colors.greenAccent,
  2. int durationMs = 2000,
  3. bool repeat = true,
  4. bool animate = true,
})
  1. Border Glow Breathe

Implementation

Widget animateWidgetBorderGlow({
  Color color = Colors.greenAccent,
  int durationMs = 2000,
  bool repeat = true,
  bool animate = true,
}) {
  if (!animate) return this;
  return _baseAnimate(repeat: repeat, reverse: true).custom(
    duration: durationMs.ms,
    builder:
        (_, v, child) => Container(
          decoration: BoxDecoration(
            borderRadius: BorderRadius.circular(12),
            border: Border.all(
              color: color.withColorOpacity(0.1 + (0.5 * v)),
              width: 1 + (2 * v),
            ),
          ),
          child: child,
        ),
  );
}