dependOnInheritedWidget method
Link a widget to a InheritedWidget of type U
Implementation
bool dependOnInheritedWidget(BuildContext? context) {
bool dependOn = context != null;
if (dependOn) {
final inheritedWidget = context.dependOnInheritedWidgetOfExactType<U>();
dependOn = inheritedWidget != null;
}
return dependOn;
}