Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,12 @@ class FlyerChatTextMessage extends StatelessWidget {
/// Text style for messages received from other users.
final TextStyle? receivedTextStyle;

/// The color of the links in the sent messages.
final Color? sentLinksColor;

/// The color of the links in the received messages.
final Color? receivedLinksColor;

/// Text style for the message timestamp and status.
final TextStyle? timeStyle;

Expand Down Expand Up @@ -85,6 +91,8 @@ class FlyerChatTextMessage extends StatelessWidget {
this.receivedBackgroundColor,
this.sentTextStyle,
this.receivedTextStyle,
this.sentLinksColor,
this.receivedLinksColor,
this.timeStyle,
this.showTime = true,
this.showStatus = true,
Expand Down Expand Up @@ -125,13 +133,19 @@ class FlyerChatTextMessage extends StatelessWidget {
)
: null;

final textContent = GptMarkdown(
message.text,
style:
_isOnlyEmoji
? paragraphStyle?.copyWith(fontSize: onlyEmojiFontSize)
: paragraphStyle,
onLinkTap: onLinkTap,
final textContent = GptMarkdownTheme(
gptThemeData: GptMarkdownTheme.of(context).copyWith(
linkColor: isSentByMe ? sentLinksColor : receivedLinksColor,
linkHoverColor: isSentByMe ? sentLinksColor : receivedLinksColor,
),
child: GptMarkdown(
message.text,
style:
_isOnlyEmoji
? paragraphStyle?.copyWith(fontSize: onlyEmojiFontSize)
: paragraphStyle,
onLinkTap: onLinkTap,
),
);

final linkPreviewWidget =
Expand Down