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