HighlightingExt extension
Extension over HighlightedString.
Methods
-
toInlineSpans(
{TextStyle regularTextStyle = const TextStyle(fontWeight: FontWeight.normal), TextStyle highlightedTextStyle = const TextStyle(fontWeight: FontWeight.bold)}) → List< InlineSpan> -
Converts HighlightedString to list of
InlineSpan
. AppliesregularTextStyle
andhighlightedTextStyle
styles to to non-highlighted and highlighted spans accordingly. -
toTextSpan(
{TextStyle? style, TextStyle regularTextStyle = const TextStyle(fontWeight: FontWeight.normal), TextStyle highlightedTextStyle = const TextStyle(fontWeight: FontWeight.bold), GestureRecognizer? recognizer, MouseCursor? mouseCursor, PointerEnterEventListener? onEnter, PointerExitEventListener? onExit, String? semanticsLabel, Locale? locale, bool? spellOut}) → TextSpan -
Converts HighlightedString to TextSpan.
Applies
regularTextStyle
andhighlightedTextStyle
styles to to non-highlighted and highlighted sub-spans accordingly.