updateSlotForChild method

  1. @protected
void updateSlotForChild (
  1. Element child,
  2. dynamic newSlot
)
@protected

Change the slot that the given child occupies in its parent.

Called by MultiChildRenderObjectElement, and other RenderObjectElement subclasses that have multiple children, when child moves from one position to another in this element's child list.

Implementation

@protected
void updateSlotForChild(Element child, dynamic newSlot) {
  assert(_debugLifecycleState == _ElementLifecycle.active);
  assert(child != null);
  assert(child._parent == this);
  void visit(Element element) {
    element._updateSlot(newSlot);
    if (element is! RenderObjectElement)
      element.visitChildren(visit);
  }
  visit(child);
}