getParsePattern method
Implementation
Widget getParsePattern(BuildContext context, String text, bool isMarkdown) {
return isMarkdown
? MarkdownBody(
data: text,
selectable: true,
onTapLink: (String value, String? href, String title) {
if (href != null) {
openLink(href);
} else {
openLink(value);
}
},
)
: ParsedText(
parse: messageOptions.parsePatterns != null
? messageOptions.parsePatterns!
: defaultParsePatterns,
text: text,
style: TextStyle(
color: isOwnMessage
? messageOptions.currentUserTextColor(context)
: messageOptions.textColor,
),
);
}