updateShouldNotifyDependent method

  1. @override
bool updateShouldNotifyDependent(
  1. covariant WildnessProvider oldWidget,
  2. Set<Type> dependencies
)
override

Return true if the changes between this model and oldWidget match any of the dependencies.

Implementation

@override
bool updateShouldNotifyDependent(
  WildnessProvider oldWidget,
  Set<Type> dependencies,
) {
  for (final aspect in dependencies) {
    if (data.components[aspect] != oldWidget.data.components[aspect] ||
        data.resources[aspect] != oldWidget.data.resources[aspect]) {
      return true;
    }
  }
  return false;
}