generateConstants method

void generateConstants(
  1. IndentingWriter out
)

Writes a Dart constant containing the JSON for the EnumProtoDescriptor.

Implementation

void generateConstants(IndentingWriter out) {
  final name = getJsonConstant(fileGen!);
  final json = _descriptor.writeToJsonMap();

  out.println('@$coreImportPrefix.Deprecated'
      '(\'Use ${toplevelParent!.binaryDescriptorName} instead\')');
  out.print('const $name = ');
  writeJsonConst(out, json);
  out.println(';');
  out.println();
}