circle method
void
circle()
animating the opacity according to min radius and waves count.
Implementation
void circle(
Canvas canvas,
Rect rect,
double? minRadius,
int wave,
double value,
int? length,
Color circleColor,
) {
Color color = circleColor;
double r;
if (wave != 0) {
final double opacity =
(1 - ((wave - 1) / length!) - value).clamp(0.0, 1.0);
color = color.withOpacity(opacity);
r = minRadius! * (1 + (wave * value)) * value;
final Paint paint = Paint()..color = color;
canvas.drawCircle(rect.center, r, paint);
}
}