attach method

  1. @override
void attach(
  1. covariant RenderObject child, {
  2. covariant RenderObject? after,
})
override

Implementation

@override
void attach(covariant RenderObject child, {covariant RenderObject? after}) {
  if (child is ChildSlotRenderObject) {
    assert(
      isAttached ? _realNodeOf(parent!).contains(child.node) : node.contains(child.node),
      'Cannot attach a child that is not already part of the component fragment.',
    );
    child.parent = this;
    child.finalize();
    return;
  }
  throw UnsupportedError('SlottedDomRenderObject cannot have children attached to them.');
}