clearSearch method

void clearSearch()

Clears the search text and resets the query.

Implementation

void clearSearch() {
  _debounceTimer?.cancel();
  _textController.clear();
  _lastSearchQuery = '';
  _focusedIndex = -1;

  if (_config.searchOnEmpty) {
    _performSearch('');
  }

  notifyListeners();
}