paint method

  1. @override
dynamic paint(
  1. Canvas canvas,
  2. Paint? paint,
  3. Size size
)
override

Implementation

@override
paint(Canvas canvas, Paint? paint, Size size) {
  var circleSpacing = 4;
  var width = size.width;
  var height = size.height;
  var radius = width / 6;
  var x = width / 2 - (radius * 2 + circleSpacing);
  var y = height / 2;
  for (int i = 0; i < 3; i++) {
    canvas.save();
    var translateX = x + (radius * 2) * i + circleSpacing * i;
    canvas.translate(translateX, y);
    canvas.scale(scaleDoubles[i], scaleDoubles[i]);
    canvas.drawCircle(Offset(0, 0), radius, paint!);
    canvas.restore();
  }
}