getTotalScrollOffset method

Offset getTotalScrollOffset()

Implementation

Offset getTotalScrollOffset() {
  double top = scrollTop;
  double left = scrollLeft;
  AbstractNode? parentNode = parent;
  while (parentNode is RenderBoxModel) {
    top += parentNode.scrollTop;
    left += parentNode.scrollLeft;

    parentNode = parentNode.parent;
  }
  return Offset(left, top);
}