attachRootRenderObject method

void attachRootRenderObject(
  1. RenderObjectWithSingleChild root
)

Attach the root render object used as the pipeline frame root.

Implementation

void attachRootRenderObject(RenderObjectWithSingleChild root) {
  final existing = _rootRenderObject;
  if (existing != null && !identical(existing, root)) {
    throw StateError('BuildOwner already has a root render object');
  }
  _rootRenderObject = root;
  (root as RenderObject).attach(pipelineOwner);
  _pointerRouter.root = root;
}