apply<T> method

  1. @override
List<TermMatch> apply<T>(
  1. FullTextSearch<T> search,
  2. TokenizedItem<T> item,
  3. String term,
  4. FTSToken token,
)
override

Applies this matcher and returns one or more match results

Implementation

@override
List<TermMatch> apply<T>(FullTextSearch<T> search, TokenizedItem<T> item,
    String term, FTSToken token) {
  term = term.toLowerCase();
  return [
    if (term.length > 1 && token.contains(term))
      TermMatch.contains(term, token),
  ];
}