writeToSink method

void writeToSink(
  1. StringSink sink
)

Implementation

void writeToSink(StringSink sink) {
  final emmiter = DartEmitter(
    orderDirectives: true,
    useNullSafetySyntax: true,
  );

  final [library] = programElement.accept(this) as List<Library>;

  sink.write(library.accept(emmiter));
}