HighlightText: Show the actual term

Not what we are searching for.

This is going to get really messy when I implement proper searching
which takes accents and text normalization into account.
This commit is contained in:
Vishesh Handa
2020-09-07 17:40:12 +02:00
parent cbc75e45e9
commit d81b2ac3ab

View File

@ -44,16 +44,14 @@ class HighlightedText extends StatelessWidget {
);
var before = text.substring(0, i);
var term = text.substring(i, i + highlightText.length);
var after = text.substring(i + highlightText.length);
return RichText(
text: TextSpan(
children: [
TextSpan(text: before, style: style),
TextSpan(
text: highlightText,
style: highlightStyle,
),
TextSpan(text: term, style: highlightStyle),
TextSpan(text: after, style: style),
],
),