centerX property
The x-coordinate of the center of the rectangle.
Calculated as left + width / 2
.
Implementation
double get centerX => left + width / 2;
Sets the x-coordinate of the center of the rectangle.
Implementation
set centerX(double newCenterX) => left = (newCenterX - width / 2) as T;