diff --git a/lib/pages/chat/events/message.dart b/lib/pages/chat/events/message.dart index 1c10c6149..b9843f77c 100644 --- a/lib/pages/chat/events/message.dart +++ b/lib/pages/chat/events/message.dart @@ -171,7 +171,9 @@ class Message extends StatelessWidget { // ? theme.colorScheme.primaryFixed // : theme.colorScheme.onTertiaryContainer // : theme.colorScheme.primary; - final linkColor = theme.colorScheme.primary; + final linkColor = theme.brightness == Brightness.light + ? theme.colorScheme.primary + : theme.colorScheme.onPrimary; // Pangea# final rowMainAxisAlignment = diff --git a/lib/pangea/activity_planner/activity_plan_message.dart b/lib/pangea/activity_planner/activity_plan_message.dart index 434bdade0..397c94407 100644 --- a/lib/pangea/activity_planner/activity_plan_message.dart +++ b/lib/pangea/activity_planner/activity_plan_message.dart @@ -120,7 +120,10 @@ class ActivityPlanMessage extends StatelessWidget { controller: controller, immersionMode: false, timeline: timeline, - linkColor: theme.colorScheme.primary, + linkColor: + theme.brightness == Brightness.light + ? theme.colorScheme.primary + : theme.colorScheme.onPrimary, ), if (event.hasAggregatedEvents( timeline, diff --git a/lib/pangea/toolbar/widgets/message_audio_card.dart b/lib/pangea/toolbar/widgets/message_audio_card.dart index febce674c..d5dcea7f1 100644 --- a/lib/pangea/toolbar/widgets/message_audio_card.dart +++ b/lib/pangea/toolbar/widgets/message_audio_card.dart @@ -205,7 +205,10 @@ class MessageAudioCardState extends State { chatController: widget.overlayController.widget.chatController, overlayController: widget.overlayController, - linkColor: Theme.of(context).colorScheme.primary, + linkColor: + Theme.of(context).brightness == Brightness.light + ? Theme.of(context).colorScheme.primary + : Theme.of(context).colorScheme.onPrimary, ) : const CardErrorWidget( error: "Null audio file in message_audio_card", diff --git a/lib/pangea/toolbar/widgets/message_token_text.dart b/lib/pangea/toolbar/widgets/message_token_text.dart index 8ba366f7a..d3e72dbca 100644 --- a/lib/pangea/toolbar/widgets/message_token_text.dart +++ b/lib/pangea/toolbar/widgets/message_token_text.dart @@ -238,7 +238,9 @@ class MessageTextWidget extends StatelessWidget { ), linkStyle: TextStyle( decoration: TextDecoration.underline, - color: Theme.of(context).colorScheme.primary, + color: Theme.of(context).brightness == Brightness.light + ? Theme.of(context).colorScheme.primary + : Theme.of(context).colorScheme.onPrimary, ), onOpen: (url) => UrlLauncher(context, url.url).launchUrl(), diff --git a/lib/pangea/toolbar/widgets/overlay_message.dart b/lib/pangea/toolbar/widgets/overlay_message.dart index 0abf3da0b..87578108f 100644 --- a/lib/pangea/toolbar/widgets/overlay_message.dart +++ b/lib/pangea/toolbar/widgets/overlay_message.dart @@ -190,7 +190,9 @@ class OverlayMessage extends StatelessWidget { prevEvent: prevEvent, borderRadius: borderRadius, timeline: timeline, - linkColor: theme.colorScheme.primary, + linkColor: theme.brightness == Brightness.light + ? theme.colorScheme.primary + : theme.colorScheme.onPrimary, ), if (event.hasAggregatedEvents( timeline,