getOffset method
Implementation
Offset getOffset(RenderBox renderBox) {
// need to flush layout to get correct size
elementManager
.getRootRenderBox()
.owner!
.flushLayout();
Element? element = _findContainingBlock(this);
element ??= elementManager.viewportElement;
return renderBox.localToGlobal(Offset.zero, ancestor: element.renderBoxModel);
}