update method
Updates this element to represent newWidget and rebuilds it.
Implementation
@override
void update(Widget newWidget) {
final oldWidget = widget;
super.update(newWidget);
final updatedWidget = widget;
if (updatedWidget.updateShouldNotify(oldWidget)) {
notifyDependents();
}
}