fromDocumentationComments static method

Annotation? fromDocumentationComments(
  1. String documentationComments
)

Implementation

static Annotation? fromDocumentationComments(String documentationComments) {
  final simpleGraphQLClientGenAnnotationRegExpMatch = IList(
          RegExp('### simpleGraphQLClientGenAnnotation\n```json\n(.+)\n```')
              .allMatches(documentationComments))
      .firstOrNull;
  final simpleGraphQLClientGenAnnotation =
      simpleGraphQLClientGenAnnotationRegExpMatch?.group(1);
  if (simpleGraphQLClientGenAnnotation == null) {
    return null;
  }
  return fromJson(JsonValue.decode(simpleGraphQLClientGenAnnotation));
}