setSlot method

void setSlot(
  1. String slot,
  2. LogSpan? child
)

Sets the span in the named slot.

Implementation

void setSlot(String slot, LogSpan? child) {
  _slots[slot]?._parent = null;
  if (child != null) {
    child._parent?._removeChild(child);
    child._parent = this;
    _slots[slot] = child;
  } else {
    _slots.remove(slot);
  }
}