search method

void search(
  1. String term
)

Executes a search in the current data structure looking for the given search term.

The search looks for matching terms in both key and values from all nodes. The results can be retrieved in the searchResults lists.

notifyListeners is called to notify all registered listeners.

Implementation

void search(String term) {
  _searchTerm = term.toLowerCase();
  _searchResults.clear();
  _focusedSearchResultIndex = 0;
  notifyListeners();

  if (term.isNotEmpty) {
    _doSearch();
  }
}