center property Null safety

Offset center

The offset to the point halfway between the left and right and the top and bottom edges of this rectangle.

Implementation

Offset get center => Offset(left + width / 2.0, top + height / 2.0);