search method

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

Implementation

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