updateShouldNotifyDependent method

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

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

Implementation

@override
bool updateShouldNotifyDependent(
  covariant InheritedFeatures oldWidget,
  Set<String> dependencies,
) {
  for (var dependency in dependencies) {
    if (flags.contains(dependency) != oldWidget.flags.contains(dependency)) {
      return true;
    }
  }

  return false;
}