/// Whether the framework should notify widgets that inherit from this widget.
///
/// When this widget is rebuilt, sometimes we need to rebuild the widgets that
/// inherit from this widget but sometimes we do not. For example, if the data
/// held by this widget is the same as the data held by `oldWidget`, then we
/// do not need to rebuild the widgets that inherited the data held by
/// `oldWidget`.
///
/// The framework distinguishes these cases by calling this function with the
/// widget that previously occupied this location in the tree as an argument.
/// The given widget is guaranteed to have the same [runtimeType] as this
/// object.
@protected
bool updateShouldNotify(covariant InheritedWidget oldWidget);
The official comment of InheritedWidget says that : when the InheritedWidget is rebuilt, the dependant widgets can choose to rebuild or not.
But in my understanding, this InheritedWidget is the parent widgets to all the dependant widgets ,and if the parent widgets is rebuild , it will make all the child widgets rebuild recursively.
Is my understanding of rebuild wrong?