getAnnotation method

DartObject? getAnnotation(
  1. Type type
)

Returns the first annotation object found of type or null if annotation of type not found

Implementation

DartObject? getAnnotation(final Type type) {
  return _typeChecker(type).firstAnnotationOfExact(this);
}