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