rotateRect function

Rect rotateRect(
  1. Rect rect,
  2. Offset center,
  3. double angle
)

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);
}