generateCodeForFile method
Implementation
String generateCodeForFile(String? filePath, ClassElement classElement,
String jsonString, String? configName) {
if (filePath == null) {
throw 'configFiles must have a valid path and configName parameter! Offending Element: $classElement';
}
try {
final Map<String, dynamic> parsedConfig = json.decode(jsonString);
if (configName == null) {
throw 'configFiles must have a valid path and configName parameter! Offending Element: $classElement';
}
return generateField(configName, classElement, parsedConfig, filePath);
} on FormatException {
print("invalid json for file $filePath!");
rethrow;
}
}