mount method

void mount(
  1. Element? parent
)

Adds this element to the tree as a child of parent.

Implementation

void mount(Element? parent) {
  this.parent = parent;
  final k = widget.key;
  if (k is GlobalKey) {
    GlobalKey._registry[k] = this;
  }
}