makeDefinesDartCodeFile function
Implementation
bool makeDefinesDartCodeFile(
File outFile, String? className, Map<String, dynamic> arbJson,List<I18nEntity> supportedLocale) {
List<String> getters = [];
arbJson.forEach((key, value) {
if (key.startsWith('@')) {
return;
}
getters.add(_makeGetterCode(value, key));
});
if (!outFile.existsSync()) {
outFile.createSync();
}
String supportedLocaleCode = _makeSupportedLocaleCode(supportedLocale);
String contentStr = _makeClassCodeString(className,supportedLocaleCode, getters.join());
outFile.writeAsStringSync(contentStr);
return true;
}