rebuild method
Rebuilds the child widget configuration and updates the child element.
Implementation
@override
/// Rebuilds the child widget configuration and updates the child element.
void rebuild() {
final inheritedWidget = widget as InheritedWidget;
if (childElement != null &&
childElement!.widget.runtimeType == inheritedWidget.child.runtimeType) {
childElement!.update(inheritedWidget.child);
} else {
childElement = inheritedWidget.child.createElement();
childElement!.mount(this);
}
}