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