getOffset method

Offset getOffset(
  1. RenderBox renderBox
)
inherited

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);
}