textMessageSpannableText function
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,
);
}