textMessageSpannableText function

Widget textMessageSpannableText(
  1. String message,
  2. bool isSentByMe, {
  3. int? maxLines,
  4. bool isClickable = true,
})

Implementation

Widget textMessageSpannableText(String message, bool isSentByMe,
    {int? maxLines, bool isClickable = true}) {
  //final GlobalKey textKey = GlobalKey();
  TextStyle underlineStyle = const TextStyle(
      decoration: TextDecoration.underline,
      fontSize: 14,
      color: Colors.blueAccent);
  TextStyle normalStyle = TextStyle(
      fontSize: 14,
      color: isSentByMe
          ? MirrorflyUikit.getTheme?.chatBubblePrimaryColor.textPrimaryColor
          : MirrorflyUikit.getTheme?.chatBubbleSecondaryColor.textPrimaryColor);
  var prevValue = Constants.emptyString;
  return Text.rich(
    customTextSpan(
        message, prevValue, normalStyle, underlineStyle, isClickable),
    maxLines: maxLines,
    overflow: maxLines == null ? null : TextOverflow.ellipsis,
  );
}