notifyClients method

  1. @protected
void notifyClients(
  1. covariant InheritedComponent oldComponent
)

Notifies all dependent elements that this inherited component has changed, by calling Element.didChangeDependencies.

This method must only be called during the build phase. Usually this method is called automatically when an inherited component is rebuilt, e.g. as a result of calling State.setState above the inherited component.

Notify other objects that the component associated with this element has changed.

Called during didUpdate after changing the component associated with this element but before rebuilding this element.

Implementation

@protected
void notifyClients(covariant InheritedComponent oldComponent) {
  assert(_debugCheckOwnerBuildTargetExists('notifyClients'));
  for (final Element dependent in _dependents.keys) {
    notifyDependent(oldComponent, dependent);
  }
}