getAnnotationsFromField method
Implementation
Future<List<Annotation>> getAnnotationsFromField(
Type _type, String propertyName) async {
var type = reflectClass(_type);
FieldDeclaration? field = await _getField(type, propertyName);
while (field == null) {
type = type.superclass!;
if (type.reflectedType == Object) {
break;
}
field = await _getField(type, propertyName);
}
if (field == null) {
return [];
}
return field.metadata;
}