updateShouldNotifyDependent method
Return true if the changes between this model and oldWidget match any
of the dependencies.
Implementation
@override
bool updateShouldNotifyDependent(StageData oldWidget, Set<Object> dependencies) {
for (final dep in dependencies) {
switch (dep) {
case _tagAspect:
if (tag != oldWidget.tag) return true;
case _widgetAspect:
if (widget != oldWidget.widget) return true;
case _hasWidgetAspect:
if ((widget != null) != (oldWidget.widget != null)) return true;
case _dismissingAspect:
if (dismissing != oldWidget.dismissing) return true;
case (#tag, final Object t):
final was = oldWidget.tag == t || oldWidget.tagStates.containsKey(t);
final now = tag == t || tagStates.containsKey(t);
if (was != now) return true;
case (#active, final Object t):
if ((tag == t) != (oldWidget.tag == t)) return true;
case (#state, final Object t):
if (tagStates[t] != oldWidget.tagStates[t]) return true;
}
}
return false;
}