getAnnotation function
Implementation
ConstantReader? getAnnotation(Element element, Type type) {
final annotations = element.metadata.annotations;
for (var annot in annotations) {
var annotation = ConstantReader(annot.computeConstantValue());
if (annotation.instanceOf(typeChecker(type))) {
return annotation;
}
}
return null;
}