updateSlot method

  1. @protected
  2. @mustCallSuper
void updateSlot(
  1. ElementSlot newSlot
)
inherited

Called by updateSlotForChild when the framework needs to change the slot that this Element occupies in its ancestor.

Implementation

@protected
@mustCallSuper
void updateSlot(ElementSlot newSlot) {
  assert(_lifecycleState == _ElementLifecycle.active);
  assert(_parent != null);
  assert(_parent!._lifecycleState == _ElementLifecycle.active);
  _slot = newSlot;
  if (this is RenderObjectElement) {
    newSlot.target = this as RenderObjectElement;
  }
}