rotateRect function
Implementation
Rect rotateRect(Rect rect, Offset center, double angle) {
final Offset leftTop = rotateOffset(rect.topLeft, center, angle);
final Offset bottomRight = rotateOffset(rect.bottomRight, center, angle);
return Rect.fromPoints(leftTop, bottomRight);
}