ensureChildAttached method

  1. @override
void ensureChildAttached()
override

Ensure child and child's child render object is attached.

Implementation

@override
void ensureChildAttached() {
  if (isRendererAttached) {
    for (Node child in childNodes) {
      if (_renderLayoutBox != null && !child.isRendererAttached) {
        RenderBox? after;
        RenderLayoutBox? scrollingContentBox = _renderLayoutBox!.renderScrollingContent;
        if (scrollingContentBox != null) {
          after = scrollingContentBox.lastChild;
        } else {
          after = _renderLayoutBox!.lastChild;
        }

        child.attachTo(this, after: after);
        child.ensureChildAttached();
      }
    }
  }
}