getAnnotatedElements method Null safety

Future<Iterable<AnnotatedElement>> getAnnotatedElements(
  1. BuildStep buildStep
)

Classes with the class-level annotation. For example, ConnectOfflineFirstWithRest.

Implementation

Future<Iterable<AnnotatedElement>> getAnnotatedElements(BuildStep buildStep) async {
  final libraryReader = LibraryReader(await buildStep.inputLibrary);
  return libraryReader.annotatedWith(typeChecker);
}