writeLibraryDefinitionToBuffer function
void
writeLibraryDefinitionToBuffer(
- StringBuffer buffer,
- List<
String> ignoreForFile, - LibraryDefinition definition
Generate Dart code typings from a query or mutation and its response from a QueryDefinition into a buffer.
Implementation
void writeLibraryDefinitionToBuffer(
StringBuffer buffer,
List<String> ignoreForFile,
LibraryDefinition definition,
) {
buffer.writeln('// GENERATED CODE - DO NOT MODIFY BY HAND');
if (ignoreForFile.isNotEmpty) {
buffer.writeln(
'// ignore_for_file: ${Set<String>.from(ignoreForFile).join(', ')}',
);
}
buffer.write('\n');
buffer.write(specToString(generateLibrarySpec(definition)));
}