prepareNameAbbyyLingvoFormat function
- PrepareDirectoryParams params
Top-level function for use in compute. See DictionaryFormat for details.
Implementation
Future<String> prepareNameAbbyyLingvoFormat(
PrepareDirectoryParams params) async {
String dictionaryFilePath =
path.join(params.workingDirectory.path, 'dictionary.dsl');
File dictionaryFile = File(dictionaryFilePath);
String nameLine =
dictionaryFile.readAsLinesSync().first.replaceFirst('#NAME', '').trim();
String name = nameLine.substring(1, nameLine.length - 1);
return name;
}