ancestorInheritedElementForWidgetOfExactType method

  1. @Deprecated('Use getElementForInheritedWidgetOfExactType instead. ' 'This feature was deprecated after v1.12.1.')
InheritedElement ancestorInheritedElementForWidgetOfExactType (
  1. Type targetType
)
@Deprecated('Use getElementForInheritedWidgetOfExactType instead. ' 'This feature was deprecated after v1.12.1.')

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

// TODO(a14n): Remove this when it goes to stable, https://github.com/flutter/flutter/pull/44189
@Deprecated(
  'Use getElementForInheritedWidgetOfExactType instead. '
  'This feature was deprecated after v1.12.1.'
)
InheritedElement ancestorInheritedElementForWidgetOfExactType(Type targetType);