wrap method
Wraps the child widget with this specific visual effect.
Implementation
@override
Widget wrap(BuildContext context, Widget child, double progress) {
final double pulse = 0.75 + 0.25 * math.sin(progress * 2 * math.pi);
return Container(
decoration: BoxDecoration(
boxShadow: [
BoxShadow(
color: color.withValues(alpha: 0.3 * pulse),
blurRadius: blurRadius * pulse,
spreadRadius: spreadRadius,
),
],
),
child: child,
);
}