setRotation method
Sets an object's rotation in degrees.
Implementation
bool setRotation(String id, double degrees) {
final object = objectById(id);
if (object == null) return false;
if (object.locked) return false;
final rotated = _rotateObject(object, degrees);
final changed = update(id, rotated);
if (changed) onRotate?.call(List.unmodifiable([rotated]));
return changed;
}