updateFreeRotation method

void updateFreeRotation(
  1. double degrees
)

@param degrees - 从滑块传来的角度值 (-45 to +45)

Implementation

void updateFreeRotation(double degrees) {
  // 核心逻辑:在进入旋转工具时备份的初始角度上,增加滑块提供的增量
  _currentRotationAngle = _backupRotationAngle + (degrees * math.pi / 180.0);
  notifyListeners();
}