attachRenderObject method

  1. @override
  2. @mustCallSuper
void attachRenderObject(
  1. Object? newSlot
)
override

Add renderObject to the render tree at the location specified by newSlot.

The default implementation of this function calls attachRenderObject recursively on each child. The RenderObjectElement.attachRenderObject override does the actual work of adding renderObject to the render tree.

The newSlot argument specifies the new value for this element's slot.

Implementation

@override
@mustCallSuper
void attachRenderObject(Object? newSlot) {
  _slot = newSlot;
  assert(_debugCheckMustNotAttachRenderObjectToAncestor());
}