getElementForInheritedComponentOfExactType<T extends InheritedComponent> abstract method

InheritedElement? getElementForInheritedComponentOfExactType<T extends InheritedComponent>()

Obtains the element corresponding to the nearest component of the given type T, which must be the type of a concrete InheritedComponent subclass.

Returns null if no such element is found.

Calling this method is O(1) with a small constant factor.

This method does not establish a relationship with the target in the way that dependOnInheritedComponentOfExactType does.

Implementation

InheritedElement? getElementForInheritedComponentOfExactType<T extends InheritedComponent>();