Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion lib/src/resolver.dart
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,10 @@ class Resolver<T, TConfiguration> extends StatefulWidget {
static T of<T>(BuildContext context) {
final type = typeOf<_ResolverInherited<T>>();
_ResolverInherited<T> resolver =
context.ancestorInheritedElementForWidgetOfExactType(type)?.widget;
context.getElementForInheritedWidgetOfExactType(type)?.widget;
// context.ancestorInheritedElementForWidgetOfExactType(type)?.widget;
// INFO: 'ancestorInheritedElementForWidgetOfExactType' is deprecated and shouldn't be used.
// Use getElementForInheritedWidgetOfExactType instead. This feature was deprecated after v1.12.1.
assert(resolver != null, "no Resolver<$type> found in the widget tree");
return resolver.instance;
}
Expand Down