isAncestorOf method

bool isAncestorOf(
  1. RenderStyle childRenderStyle
)

Implementation

bool isAncestorOf(RenderStyle childRenderStyle) {
  RenderStyle? parentRenderStyle = childRenderStyle.parent;
  while(parentRenderStyle != null) {
    if (parentRenderStyle == this) {
      return true;
    }
    parentRenderStyle = parentRenderStyle.parent;
  }
  return false;
}