ancestorInheritedElementForWidgetOfExactType method
- @Deprecated('Use getElementForInheritedWidgetOfExactType instead. ' 'This feature was deprecated after v1.12.1.')
- @override
- Type targetType
@Deprecated('Use getElementForInheritedWidgetOfExactType instead. ' 'This feature was deprecated after v1.12.1.'), override
Obtains the element corresponding to the nearest widget of the given type, which must be the type of a concrete InheritedWidget subclass.
This method is deprecated. Please use getElementForInheritedWidgetOfExactType instead.
Implementation
@Deprecated(
'Use getElementForInheritedWidgetOfExactType instead. '
'This feature was deprecated after v1.12.1.'
)
@override
InheritedElement ancestorInheritedElementForWidgetOfExactType(Type targetType) {
assert(_debugCheckStateIsActiveForAncestorLookup());
final InheritedElement ancestor = _inheritedWidgets == null ? null : _inheritedWidgets[targetType];
return ancestor;
}