mount method

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

Adds this element to the tree, creates the state, and builds the child.

Implementation

@override
/// Adds this element to the tree, creates the state, and builds the child.
void mount(Element? parent) {
  super.mount(parent);
  state = (widget as StatefulWidget).createState();
  state._widget = widget as StatefulWidget;
  state._context = this;
  state.initState();
  state.didChangeDependencies();
  rebuild();
}