getFieldAnnotation function

ConstantReader? getFieldAnnotation(
  1. FieldElement field,
  2. Type type
)

Implementation

ConstantReader? getFieldAnnotation(FieldElement field, Type type) {
  final annot =
      typeChecker(type).firstAnnotationOf(field, throwOnUnresolved: false);
  if (annot != null) return ConstantReader(annot);

  return null;
}