@@ -49,6 +49,12 @@ class FlyerChatTextMessage extends StatelessWidget {
4949 /// Text style for messages received from other users.
5050 final TextStyle ? receivedTextStyle;
5151
52+ /// The color of the links in the sent messages.
53+ final Color ? sentLinksColor;
54+
55+ /// The color of the links in the received messages.
56+ final Color ? receivedLinksColor;
57+
5258 /// Text style for the message timestamp and status.
5359 final TextStyle ? timeStyle;
5460
@@ -85,6 +91,8 @@ class FlyerChatTextMessage extends StatelessWidget {
8591 this .receivedBackgroundColor,
8692 this .sentTextStyle,
8793 this .receivedTextStyle,
94+ this .sentLinksColor,
95+ this .receivedLinksColor,
8896 this .timeStyle,
8997 this .showTime = true ,
9098 this .showStatus = true ,
@@ -125,13 +133,19 @@ class FlyerChatTextMessage extends StatelessWidget {
125133 )
126134 : null ;
127135
128- final textContent = GptMarkdown (
129- message.text,
130- style:
131- _isOnlyEmoji
132- ? paragraphStyle? .copyWith (fontSize: onlyEmojiFontSize)
133- : paragraphStyle,
134- onLinkTap: onLinkTap,
136+ final textContent = GptMarkdownTheme (
137+ gptThemeData: GptMarkdownTheme .of (context).copyWith (
138+ linkColor: isSentByMe ? sentLinksColor : receivedLinksColor,
139+ linkHoverColor: isSentByMe ? sentLinksColor : receivedLinksColor,
140+ ),
141+ child: GptMarkdown (
142+ message.text,
143+ style:
144+ _isOnlyEmoji
145+ ? paragraphStyle? .copyWith (fontSize: onlyEmojiFontSize)
146+ : paragraphStyle,
147+ onLinkTap: onLinkTap,
148+ ),
135149 );
136150
137151 final linkPreviewWidget =
0 commit comments