firstAnnotationOf abstract method

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

Returns the first constant annotating element assignable to this type.

Otherwise returns null.

Throws on unresolved annotations unless throwOnUnresolved is false.

Implementation

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