updateShouldNotifyDependent method

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

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

Implementation

@override
bool updateShouldNotifyDependent(
  covariant InheritedModel<Widget> oldWidget,
  Set<Widget> dependencies,
) {
  // check if there is a mutation executed for which
  // dependent has listened
  return dependencies.intersection(recent!).isNotEmpty;
}