deleteDictionariesHelper function
- DeleteDictionaryParams params
Clears all data from the dictionary database.
Implementation
Future<void> deleteDictionariesHelper(DeleteDictionaryParams params) async {
final Isar database = await Isar.open(
globalSchemas,
directory: params.directoryPath,
maxSizeMiB: 8192,
);
database.writeTxnSync(() {
database.dictionarySearchResults.clearSync();
database.dictionaryTags.clearSync();
database.dictionaryEntrys.clearSync();
database.dictionaryHeadings.clearSync();
database.dictionaryPitchs.clearSync();
database.dictionaryFrequencys.clearSync();
database.dictionarys.clearSync();
});
}