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