getRootBoxModel method

RenderBoxModel? getRootBoxModel()

Get the root box model of document which corresponds to html element.

Implementation

RenderBoxModel? getRootBoxModel() {
  RenderBoxModel _self = this;
  while (_self.parent != null && _self.parent is! RenderViewportBox) {
    _self = _self.parent as RenderBoxModel;
  }
  return _self.parent is RenderViewportBox ? _self : null;
}