animateWidgetGlassGlow method
Widget
animateWidgetGlassGlow(
{ - Color glowColor = Colors.amberAccent,
- int durationMs = 3000,
- bool repeat = true,
- bool animate = true,
})
Implementation
Widget animateWidgetGlassGlow(
{Color glowColor = Colors.amberAccent,
int durationMs = 3000,
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(
borderRadius: BorderRadius.circular(16),
boxShadow: [
BoxShadow(
color:
glowColor.withColorOpacity(0.2 * (1 - (v - 0.5).abs() * 2)),
blurRadius: 20,
spreadRadius: 2)
],
),
child: c,
),
);
}