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