clearSearchHistory method

void clearSearchHistory(
  1. {required String historyKey}
)

Clear the search history with the given historyKey.

Implementation

void clearSearchHistory({
  required String historyKey,
}) {
  _database.writeTxnSync(() {
    _database.searchHistoryItems
        .where()
        .historyKeyEqualTo(historyKey)
        .build()
        .deleteAllSync();
  });
}