animateSmoothGlow method
Widget
animateSmoothGlow(
{ - Color color = Colors.blueAccent,
- bool animate = true,
})
Implementation
Widget animateSmoothGlow(
{Color color = Colors.blueAccent, bool animate = true}) {
if (!animate) return this;
return this
.animate(onPlay: (controller) => controller.repeat(reverse: true))
.custom(
duration: 1500.ms,
builder: (context, value, child) => Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(12),
boxShadow: [
BoxShadow(
color: color.withValues(alpha: 0.2 * value),
blurRadius: 15 * value,
spreadRadius: 2 * value,
),
],
),
child: child,
),
);
}