rebuild method
Rebuilds the element.
Implementation
@override
void rebuild() {
final win = widget as Window;
if (childElement != null &&
childElement!.widget.runtimeType == win.child.runtimeType) {
childElement!.update(win.child);
} else {
childElement?.unmount();
childElement = win.child.createElement();
childElement!.mount(this);
}
}