formatRichTextWithWord method

RichText? formatRichTextWithWord(
  1. String keyWord,
  2. List<TextStyle> styles, {
  3. TextAlign textAlign = TextAlign.left,
  4. TextOverflow overflow = TextOverflow.visible,
})

Implementation

RichText? formatRichTextWithWord(
  String keyWord,
  List<TextStyle> styles, {
  TextAlign textAlign = TextAlign.left,
  TextOverflow overflow = TextOverflow.visible,
}) {
  if (keyWord.trim().isEmpty || isEmpty) {
    return null;
  }
  debugPrint('formatRichTextWithWord$styles');
  return formatColorRichText(styles, regex: RegExp(keyWord, caseSensitive: false));
}