updateShouldNotifyDependent method
bool
updateShouldNotifyDependent(
- covariant SlideProvider oldWidget,
- Set<
SlideProviderAspect> dependencies
override
Return true if the changes between this model and oldWidget
match any
of the dependencies
.
Implementation
@override
bool updateShouldNotifyDependent(
covariant SlideProvider oldWidget,
Set<SlideProviderAspect> dependencies,
) {
if (dependencies.contains(SlideProviderAspect.slide) &&
slide != oldWidget.slide) {
return true;
}
if (dependencies.contains(SlideProviderAspect.spec) &&
spec != oldWidget.spec) {
return true;
}
if (dependencies.contains(SlideProviderAspect.isSnapshot) &&
isSnapshot != oldWidget.isSnapshot) {
return true;
}
if (dependencies.contains(SlideProviderAspect.examples) &&
examples != oldWidget.examples) {
return true;
}
if (dependencies.contains(SlideProviderAspect.assets) &&
assets != oldWidget.assets) {
return true;
}
return false;
}