mount method
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.internalWidget = widget as StatefulWidget;
state.internalContext = this;
state.initState();
state.didChangeDependencies();
rebuild();
}