dependOnInheritedWidget method
Set the specified widget (through its context) as a dependent of the InheritedWidget
Return false if not configured to use the InheritedWidget
Implementation
@override
bool dependOnInheritedWidget(BuildContext? context) {
final depend = context != null;
if (depend) {
if (_inheritedElement == null) {
_dependencies.add(context);
} else {
context.dependOnInheritedElement(_inheritedElement!);
}
}
return depend;
}