chore: update link text color in dark mode (#1716)

This commit is contained in:
ggurdin 2025-02-05 15:15:26 -05:00 committed by GitHub
parent 76a465f14f
commit 18cbb45fe1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 17 additions and 5 deletions

View file

@ -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 =

View file

@ -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,

View file

@ -205,7 +205,10 @@ class MessageAudioCardState extends State<MessageAudioCard> {
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",

View file

@ -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(),

View file

@ -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,