Offset getWidgetCenter(RenderBox? renderBox) => renderBox != null ? (renderBox.size.toOffset() / 2) : Offset.zero;