removeRenderObjectChild method Null safety

  1. @override
void removeRenderObjectChild(
  1. covariant RenderBox child,
  2. covariant S slot
)
override

Remove the given child from renderObject.

The given child is guaranteed to have been inserted at the given slot and have renderObject as its parent.

Implementation

@override
void removeRenderObjectChild(RenderBox child, S slot) {
  if (renderObject._slotToChild[slot] == child) {
    renderObject._setChild(null, slot);
    assert(renderObject._slotToChild[slot] == null);
  }
}