mount method

  1. @override
void mount(
  1. Element? parent
)
override

Adds this element to the tree at the given parent.

Implementation

@override
void mount(Element? parent) {
  super.mount(parent);
  final childWidget = (widget as SingleChildRenderObjectWidget).child;
  if (childWidget != null) {
    _child = updateChild(null, childWidget);
    if (_child?.renderObject != null) {
      (renderObject as RenderObjectWithChildMixin<RenderObject>).child =
          _child!.renderObject!;
    }
  }
}