Offset topCenter(Offset origin)

The offset to the center of the top edge of the rectangle described by the given offset (which is interpreted as the top-left corner) and this size.

See also Rect.topCenter.

Source

Offset topCenter(Offset origin) => new Offset(origin.dx + width / 2.0, origin.dy);