Commit 7db4f8df authored by Adam Barth's avatar Adam Barth

Fix spelling of dependents

Noticed in #2733
parent 2b825dc3
...@@ -932,7 +932,7 @@ abstract class Element implements BuildContext { ...@@ -932,7 +932,7 @@ abstract class Element implements BuildContext {
assert(_active); assert(_active);
if (_dependencies != null) { if (_dependencies != null) {
for (InheritedElement dependency in _dependencies) for (InheritedElement dependency in _dependencies)
dependency._dependants.remove(this); dependency._dependents.remove(this);
_dependencies.clear(); _dependencies.clear();
} }
_active = false; _active = false;
...@@ -970,7 +970,7 @@ abstract class Element implements BuildContext { ...@@ -970,7 +970,7 @@ abstract class Element implements BuildContext {
assert(ancestor is InheritedElement); assert(ancestor is InheritedElement);
_dependencies ??= new HashSet<InheritedElement>(); _dependencies ??= new HashSet<InheritedElement>();
_dependencies.add(ancestor); _dependencies.add(ancestor);
ancestor._dependants.add(this); ancestor._dependents.add(this);
return ancestor.widget; return ancestor.widget;
} }
return null; return null;
...@@ -1537,7 +1537,7 @@ class InheritedElement extends _ProxyElement { ...@@ -1537,7 +1537,7 @@ class InheritedElement extends _ProxyElement {
@override @override
InheritedWidget get widget => super.widget; InheritedWidget get widget => super.widget;
final Set<Element> _dependants = new HashSet<Element>(); final Set<Element> _dependents = new HashSet<Element>();
@override @override
void _updateInheritance() { void _updateInheritance() {
...@@ -1552,7 +1552,7 @@ class InheritedElement extends _ProxyElement { ...@@ -1552,7 +1552,7 @@ class InheritedElement extends _ProxyElement {
@override @override
void debugDeactivated() { void debugDeactivated() {
assert(() { assert(() {
assert(_dependants.isEmpty); assert(_dependents.isEmpty);
return true; return true;
}); });
super.debugDeactivated(); super.debugDeactivated();
...@@ -1563,7 +1563,7 @@ class InheritedElement extends _ProxyElement { ...@@ -1563,7 +1563,7 @@ class InheritedElement extends _ProxyElement {
if (!widget.updateShouldNotify(oldWidget)) if (!widget.updateShouldNotify(oldWidget))
return; return;
final Type ourRuntimeType = widget.runtimeType; final Type ourRuntimeType = widget.runtimeType;
for (Element dependant in _dependants) { for (Element dependant in _dependents) {
dependant.dependenciesChanged(ourRuntimeType); dependant.dependenciesChanged(ourRuntimeType);
assert(() { assert(() {
// check that it really is our descendant // check that it really is our descendant
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment