search method

  1. @override
SearchResult search(
  1. SearchQuery<T> query
)
override

Implementation

@override
SearchResult search(SearchQuery<T> query) {
  if (query.query.isEmpty) {
    return SearchResult(0, query.selectedValue.contains(value));
  }
  return SearchResult(
    computeIndexingScore?.call(query.query) ??
        query.searchFilter?.call(value, query.query) ??
        0,
    query.selectedValue.contains(value),
  );
}