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 translateX = size.width / 9;
  var translateY = size.height / 2;

  for (int i = 0; i < 4; i++) {
    canvas.save();
    canvas.translate((2 + i * 2) * translateX - translateX / 2, translateY);
    canvas.scale(scaleDoubles[i], scaleDoubles[i]);
    var rectF = RRect.fromLTRBR(-translateX / 2, -size.height / 2.5,
        translateX / 2, size.height / 2.5, Radius.circular(5));
    canvas.drawRRect(rectF, paint!);
    canvas.restore();
  }
}