isTermInSearchHistory method
Get whether or not a certain searchTerm
is in a certain history.
Implementation
bool isTermInSearchHistory({
required String historyKey,
required String searchTerm,
}) {
SearchHistoryItem searchHistoryItem = SearchHistoryItem(
searchTerm: searchTerm,
historyKey: historyKey,
);
SearchHistoryItem? duplicateItem = _database.searchHistoryItems
.getByUniqueKeySync(searchHistoryItem.uniqueKey);
return duplicateItem != null;
}