firstAnnotationOfExact abstract method

DartObject? firstAnnotationOfExact(
  1. Element element, {
  2. bool throwOnUnresolved = true,
})

Returns the first constant annotating element that is exactly this type.

Throws UnresolvedAnnotationException on unresolved annotations unless throwOnUnresolved is explicitly set to false (default is true).

Implementation

DartObject? firstAnnotationOfExact(
  Element element, {
  bool throwOnUnresolved = true,
});