findScrollContainer method
Find scroll container
Implementation
RenderBoxModel? findScrollContainer() {
RenderBoxModel? scrollContainer;
RenderObject? parent = this.parent;
while (parent != null && parent is RenderLayoutBox) {
if (parent.isScrollingContentBox && parent.parent is RenderLayoutBox) {
// Scroll container should has definite constraints
scrollContainer = parent.parent as RenderBoxModel;
break;
}
parent = parent.parent;
}
return scrollContainer;
}