generateDartClasses method
generateDartClasses will generate all classes and append one after another
in a single string. The rawJson
param is assumed to be a properly
formatted JSON string. If the generated dart is invalid it will throw an error.
Implementation
DartCode generateDartClasses(String rawJson) {
final unsafeDartCode = generateUnsafeDart(rawJson);
final formatter = new DartFormatter();
return new DartCode(
formatter.format(unsafeDartCode.code), unsafeDartCode.warnings);
}