insertRenderObjectChild method Null safety
- covariant RenderObject child,
- covariant int slot
override
Insert the given child into renderObject at the given slot.
The semantics of slot
are determined by this element. For example, if
this element has a single child, the slot should always be null. If this
element has a list of children, the previous sibling element wrapped in an
IndexedSlot is a convenient value for the slot.
Implementation
@override
void insertRenderObjectChild(covariant RenderObject child, int slot) {
assert(slot != null);
assert(_currentlyUpdatingChildIndex == slot);
assert(renderObject.debugValidateChild(child));
renderObject.insert(child as RenderBox, after: _currentBeforeChild);
assert(() {
final SliverMultiBoxAdaptorParentData childParentData = child.parentData! as SliverMultiBoxAdaptorParentData;
assert(slot == childParentData.index);
return true;
}());
}