model/ui/highlighted_text_model library

Classes

HighlightedTextSegment
Represents a sub-sequence of a search suggestion, highlighted based on whether it matches the query string.
TextHighlighter
A class to highlight the occurrences of a list of tokens within a string. By default, matches are only highlighted at the start of words, and matching is case-insensitive.

Typedefs

Highlighter<T> = List<HighlightedTextSegment> Function(String query, T? value)
Produces a list of HighlightedTextSegment instances for the given query and value.