highlight property

Highlight highlight
final

The highlight searching model. Has two options: │─▶ Pattern - A regex pattern that would work for each char of data. ╰─▶ Words - A list of highlightable words/letters.

Example

HighlightText(
  highlight: Highlight(
    pattern: r'\d', // Highlight each number in [data].
    words: ['number', ...], // Highlight defined words in [data].
  ),
  ...
)

Implementation

final Highlight highlight;