keySearch method
- required KeyCharSearches<
T> keyCharSearches, - required dynamic searchTerms,
- int maxResults = 0,
Searches for items in this iterable based on the given searchTerms
.
The keyCharSearches
parameter is a map where the keys are strings representing search prefixes,
and the values are functions that take a search term and an item, and return a boolean indicating
whether the item matches the search term.
The searchTerms
parameter is the term or terms to search for. It can be a single term or a list of terms.
The maxResults
parameter specifies the maximum number of results to return. If it is 0, all matching items are returned.
Returns an iterable of items that match the search criteria.
Implementation
Iterable<T> keySearch({
required KeyCharSearches<T> keyCharSearches,
required dynamic searchTerms,
int maxResults = 0,
}) {
return FilterFunctions.keySearch(
items: this,
searchTerms: searchTerms,
maxResults: maxResults,
keyCharSearches: keyCharSearches,
);
}