centerX property

double get centerX

The x-coordinate of the center of the rectangle. Calculated as left + width / 2.

Implementation

double get centerX => left + width / 2;
set centerX (double newCenterX)

Sets the x-coordinate of the center of the rectangle.

Implementation

set centerX(double newCenterX) => left = (newCenterX - width / 2) as T;