getField abstract method

Returns a specific field by name.

If no field with the given name was declared, returns null.

Example

final annotation = ...;
final field = annotation.getField('value');
print(field.getName()); // "value"

Implementation

AnnotationFieldDeclaration? getField(String name);