removeRenderObjectChild method
Copied from SliverMultiBoxAdaptorElement.removeRenderObjectChild. This method has been changed to prevent the removal of unlisted children (eg off-list elements).
Implementation
@override
void removeRenderObjectChild(
covariant RenderObject child, final _Slot? slot) {
if (_creatingDisposableElement) {
assert(slot == null);
renderObject.dropChild(child);
return;
}
assert(_creatingDisposableElement || _currentlyUpdatingChildIndex != null);
final childParentData =
child.parentData! as MultiSliverMultiBoxAdaptorParentData;
renderObject.remove(childParentData.key, child as RenderBox);
}