getAnnotation<T> function
Gets a specific annotation from a class or member
Implementation
T? getAnnotation<T>(DeclarationMirror mirror) {
for (final metadata in mirror.metadata) {
final annotation = metadata.reflectee;
if (annotation is T) {
return annotation;
}
}
return null;
}