search_me_up library
Search Me Up helps you create a search function with a tiering system.
The fastest way to see how this works is to get a SearchMeUp with a DefaultSearchMeUpDelegate. By default this will work with Strings, so just pass some test data and then call rankedSearch
and see the results.
Classes
-
DefaultSearchMeUpDelegate<
T> - Default implementation of SearchMeUpDelegate
-
SearchMeUp<
T> - This handles the search ranking logic, based on whatever delegate is given.
-
SearchMeUpDelegate<
T> -
SortedSearchList<
T, S>
Functions
-
defaultSMUTextConverter(
dynamic val) → Iterable< String> - Default text converter, just converts the object to string.
-
frontTextSearcher(
String searchText) → SMUTextSearcher -
Output will check if any given input starts with the
searchText
, case insensitive. -
generateTextSearcherFromRegExp(
RegExp expression) → SMUTextSearcher -
Creates the corresponding SMUTextSearcher from the given
expression
. -
inlineTextSearcher(
String searchText) → SMUTextSearcher -
Output will check if any given input contains the
searchText
, case insensitive. -
orderTextSearcher(
String searchText) → SMUTextSearcher -
Output will check if any given input contains the
searchText
, with any amount of letters inserted withinsearchText
, case-insensitive.
Typedefs
-
SMUTextConverter<
T> = Iterable< String> Function(T input) -
Converts the
input
into the value used by SMUTextSearcher -
SMUTextSearcher
= bool Function(Iterable<
String> input) -
Will see if the given
input
matches this function. - SMUTextSearcherProvider = SMUTextSearcher Function(String searchText)
-
Provides an SMUTextSearcher that will search for the given
searchText