From 7f9f6e2c046713caf5d0d4be06e543232b5069c0 Mon Sep 17 00:00:00 2001 From: Salvatore Giordano Date: Tue, 21 Jul 2020 11:15:59 +0200 Subject: [PATCH] fix dark ui message background --- lib/src/stream_chat_theme.dart | 17 +++++++++++++---- lib/src/video_attachment.dart | 1 + 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/lib/src/stream_chat_theme.dart b/lib/src/stream_chat_theme.dart index ee0a41a3..851e4a9c 100644 --- a/lib/src/stream_chat_theme.dart +++ b/lib/src/stream_chat_theme.dart @@ -97,19 +97,25 @@ class StreamChatThemeData { primaryColor: theme.colorScheme.primary, secondaryColor: theme.colorScheme.secondary, backgroundColor: theme.scaffoldBackgroundColor, - channelTheme: ChannelTheme( + channelTheme: defaultTheme.channelTheme.copyWith( inputGradient: LinearGradient(colors: [ theme.accentColor.withOpacity(.5), theme.accentColor, ]), ), - ownMessageTheme: MessageTheme( + ownMessageTheme: defaultTheme.ownMessageTheme.copyWith( replies: defaultTheme.ownMessageTheme.replies.copyWith( color: theme.accentColor, ), + messageLinks: TextStyle( + color: theme.accentColor, + ), ), - otherMessageTheme: MessageTheme( - replies: defaultTheme.ownMessageTheme.replies.copyWith( + otherMessageTheme: defaultTheme.otherMessageTheme.copyWith( + replies: defaultTheme.otherMessageTheme.replies.copyWith( + color: theme.accentColor, + ), + messageLinks: TextStyle( color: theme.accentColor, ), ), @@ -315,6 +321,9 @@ class StreamChatThemeData { fontWeight: FontWeight.bold, fontSize: 12, ), + messageLinks: TextStyle( + color: accentColor, + ), messageBackgroundColor: isDark ? Colors.black : Colors.white, avatarTheme: AvatarTheme( borderRadius: BorderRadius.circular(20), diff --git a/lib/src/video_attachment.dart b/lib/src/video_attachment.dart index a903147b..b0d1f60d 100644 --- a/lib/src/video_attachment.dart +++ b/lib/src/video_attachment.dart @@ -123,6 +123,7 @@ class _VideoAttachmentState extends State { ), if (widget.attachment.title != null) Material( + color: widget.messageTheme.messageBackgroundColor, child: AttachmentTitle( messageTheme: widget.messageTheme, attachment: widget.attachment,