updateRotation method
Implementation
updateRotation(double degrees) {
double currentRotation = toDegrees(this.rotation) as double;
double newRotation = toRadian(degrees) as double;
this.rotation = this.rotation + newRotation;
markNeedsPaint();
}