getDependencies method
- @protected
@protected
Returns the dependencies value recorded for dependent
with setDependencies.
Each dependent element is mapped to a single object value which represents how the element depends on this InheritedElement. This value is null by default and by default dependent elements are rebuilt unconditionally.
Subclasses can manage these values with updateDependencies
so that they can selectively rebuild dependents in
notifyDependents
.
This method is typically only called in overrides of updateDependencies.
See also:
- updateDependencies, which is called each time a dependency is created with inheritFromWidgetOfExactType.
- setDependencies, which sets dependencies value for a dependent element.
- notifyDependent, which can be overridden to use a dependent's dependencies value to decide if the dependent needs to be rebuilt.
- InheritedModel, which is an example of a class that uses this method to manage dependency values.
Implementation
@protected
Object getDependencies(Element dependent) {
return _dependents[dependent];
}