diff --git a/lib/provide.dart b/lib/provide.dart index 9c827b3..31b10ad 100644 --- a/lib/provide.dart +++ b/lib/provide.dart @@ -567,7 +567,7 @@ class _InheritedProviders extends InheritedWidget { /// Finds the closest _InheritedProviders widget abocve the current widget. static _InheritedProviders of(BuildContext context) { - final widget = context.inheritFromWidgetOfExactType(_InheritedProviders); + final widget = context.dependOnInheritedWidgetOfExactType<_InheritedProviders>(); return widget is _InheritedProviders ? widget : null; }