animateInsetPulse method
Widget
animateInsetPulse(
{ - bool animate = true,
})
Implementation
Widget animateInsetPulse({bool animate = true}) {
if (!animate) return this;
return this
.animate(onPlay: (controller) => controller.repeat(reverse: true))
.custom(
duration: 1200.ms,
builder: (context, value, child) => Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(12),
boxShadow: [
BoxShadow(
color: Colors.black.withValues(alpha: 0.05 * value),
blurRadius: 10 * value,
spreadRadius: -5 * value,
offset: Offset(2 * value, 2 * value),
),
],
),
child: child,
),
);
}