draw method
Implementation
void draw(Canvas canvas, Size size, Paint paint) {
final Rect rect =
Rect.fromCenter(center: pos, width: width, height: height);
fillShape
? canvas.drawPath(
shape.getOuterPath(
rect,
),
paint,
)
: shape
.copyWith(
side: shape.side.copyWith(
color: color,
),
)
.paint(
canvas,
rect,
);
velocity += acceleration;
velocity.dy < 0 ? pos += velocity : exploded = true;
}