isDirectlyAnnotatedByText function

bool isDirectlyAnnotatedByText(
  1. AnnotatedNode node,
  2. String shortName,
  3. String longName
)

Implementation

bool isDirectlyAnnotatedByText(
  AnnotatedNode node,
  String shortName,
  String longName,
) {
  for (final metadata in node.metadata) {
    final source = metadata.toSource();
    if (source.contains(shortName) || source.contains(longName)) {
      return true;
    }
  }
  return false;
}