consume method
Implementation
@override
Future consume(Texts texts) async {
Directory(_textsPath).createSync(recursive: true);
for (var language in texts.languages) {
var languageCode = language.code;
var content = _encoder.convert(language.translations);
var translationsFile = File('$_textsPath/string_$languageCode.json');
translationsFile.createSync();
translationsFile.writeAsStringSync(content);
}
try {
handleGenerateI18nFiles(I18nOption(_textsPath, 'en', 'lib/generated'));
} catch (exception) {
_message = exception.toString();
}
}