YmlGeneratorConfig.merge constructor
YmlGeneratorConfig.merge(
- Iterable<
YmlGeneratorConfig> configs, - String dirName
Implementation
YmlGeneratorConfig.merge(Iterable<YmlGeneratorConfig> configs, String dirName)
: fileName = dirName {
final names = <String, YmlGeneratorConfig>{};
for (final config in configs) {
for (final model in config.models) {
if (names.containsKey(model.name)) {
throw Exception(
'Model with same name ${model.name} found in multiple files: ${names[model.name]!.fileName} and ${config.fileName}');
}
names[model.name] = config;
}
_models.addAll(config.models);
}
}