closeSearch method

void closeSearch([
  1. bool disableSearch = false
])

Disables and disposes the searching.

Implementation

void closeSearch([bool disableSearch = false]) {
  searching.value = false;
  if (disableSearch) {
    _toggleSearch(false);
  } else {
    search.value?.search.clear();
    search.value?.query.value = '';
  }
}