rotateByCenter method

Matrix4Transform rotateByCenter(
  1. double angleRadians,
  2. Size size
)

Rotates by angleRadians radians, clockwise. The axis of rotation will be the center of the object with the given size.

Implementation

Matrix4Transform rotateByCenter(double angleRadians, Size size) => rotate(
      angleRadians,
      origin: Offset(size.width / 2, size.height / 2),
    );