addConstantImportsTo method

void addConstantImportsTo(
  1. Set<FileGenerator> imports
)

Adds dependencies of generateConstants to imports.

For each .pbjson.dart file that the generated code needs to import, add its generator.

Implementation

void addConstantImportsTo(Set<FileGenerator> imports) {
  checkResolved();
  for (final m in _messageGenerators) {
    m.addConstantImportsTo(imports);
  }
  for (final x in _extensionGenerators) {
    x.addConstantImportsTo(imports);
  }
}