updateDictionaryResultScrollIndex method
- {required DictionarySearchResult result,
- required int newIndex}
Update the scroll index of a given DictionarySearchResult in the database.
Implementation
Future<void> updateDictionaryResultScrollIndex({
required DictionarySearchResult result,
required int newIndex,
}) async {
ReceivePort receivePort = ReceivePort();
UpdateDictionaryHistoryParams params = UpdateDictionaryHistoryParams(
resultId: result.id!,
directoryPath: _databaseDirectory.path,
newPosition: newIndex,
maximumDictionaryHistoryItems: maximumDictionaryHistoryItems,
sendPort: receivePort.sendPort,
);
await compute(updateDictionaryHistoryHelper, params);
}