update method
Updates the widget configuration to newWidget.
Implementation
@override
void update(Widget newWidget) {
final oldWidget = widget as InheritedWidget;
widget = newWidget;
if (oldWidget.updateShouldNotify(newWidget as InheritedWidget)) {
for (final dependent in _dependents) {
dependent.markNeedsBuild();
}
}
rebuild();
}