update method
Updates this element to use a new Widget configuration.
Implementation
@override
void update(Widget newWidget) {
final oldWidget = widget as InheritedWidget;
super.update(newWidget);
final nextWidget = newWidget as InheritedWidget;
if (nextWidget.updateShouldNotify(oldWidget)) {
rebuild();
}
}