updateRotation method

dynamic updateRotation(
  1. double degrees
)

Implementation

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

  markNeedsPaint();
}