render method
Implementation
@override
void render(Canvas canvas) {
super.render(canvas);
if (isVisible) {
animation?.getSprite().render(
canvas,
position: position,
size: size,
overridePaint: paint,
);
}
if (animation?.done() == true) {
onFinish?.call();
removeFromParent();
}
}