getAttributedText method
List<AttributedText>
getAttributedText(
- String text,
- CometChatTheme theme,
- BubbleAlignment? alignment, {
- List<
AttributedText> ? existingAttributes, - dynamic onTap()?,
- bool forConversation = false,
override
getAttributedText is a function which is used to get the attributed text which is used to style the text in the message bubble and conversation subtitle
Implementation
@override
List<AttributedText> getAttributedText(
String text, CometChatTheme theme, BubbleAlignment? alignment,
{List<AttributedText>? existingAttributes,
Function(String)? onTap,
bool forConversation = false}) {
return super.getAttributedText(text, theme, alignment,
existingAttributes: existingAttributes,
onTap: onTap ??
(text) async {
if (pattern != null && pattern!.hasMatch(text)) {
await launchUrl(Uri.parse(('mailto:$text')));
}
},
forConversation: forConversation);
}