update method
Implementation
@override
void update() {
position = Offset(
position.dx + cos(direction) * speedX,
position.dy + sin(direction) * speedY,
);
rotation += rotationSpeed;
// Reset if particle goes out of bounds
if (position.dx < 0 ||
position.dx > screenSize.width ||
position.dy > screenSize.height) {
reset();
}
}