updateShouldNotifyDependent method
bool
updateShouldNotifyDependent(
- covariant CounterModel oldWidget,
- Set<
CounterAspect> dependencies
override
Return true if the changes between this model and oldWidget match any
of the dependencies.
Implementation
@override
bool updateShouldNotifyDependent(CounterModel oldWidget, Set<CounterAspect> dependencies) {
if (color != oldWidget.color && dependencies.contains(CounterAspect.color)) {
return true;
}
if (counter != oldWidget.counter && dependencies.contains(CounterAspect.value)) {
return true;
}
return false;
}