getMethodAnnotation function

ConstantReader? getMethodAnnotation(
  1. MethodElement method
)

Implementation

ConstantReader? getMethodAnnotation(MethodElement method) {
  for (final type in _methodsAnnotations) {
    final annot =
        typeChecker(type).firstAnnotationOf(method, throwOnUnresolved: false);
    if (annot != null) return ConstantReader(annot);
  }
  return null;
}