fix dark ui message background

This commit is contained in:
Salvatore Giordano
2020-07-21 11:15:59 +02:00
parent 9c287e02ba
commit 7f9f6e2c04
2 changed files with 14 additions and 4 deletions
+13 -4
View File
@@ -97,19 +97,25 @@ class StreamChatThemeData {
primaryColor: theme.colorScheme.primary, primaryColor: theme.colorScheme.primary,
secondaryColor: theme.colorScheme.secondary, secondaryColor: theme.colorScheme.secondary,
backgroundColor: theme.scaffoldBackgroundColor, backgroundColor: theme.scaffoldBackgroundColor,
channelTheme: ChannelTheme( channelTheme: defaultTheme.channelTheme.copyWith(
inputGradient: LinearGradient(colors: [ inputGradient: LinearGradient(colors: [
theme.accentColor.withOpacity(.5), theme.accentColor.withOpacity(.5),
theme.accentColor, theme.accentColor,
]), ]),
), ),
ownMessageTheme: MessageTheme( ownMessageTheme: defaultTheme.ownMessageTheme.copyWith(
replies: defaultTheme.ownMessageTheme.replies.copyWith( replies: defaultTheme.ownMessageTheme.replies.copyWith(
color: theme.accentColor, color: theme.accentColor,
), ),
messageLinks: TextStyle(
color: theme.accentColor,
),
), ),
otherMessageTheme: MessageTheme( otherMessageTheme: defaultTheme.otherMessageTheme.copyWith(
replies: defaultTheme.ownMessageTheme.replies.copyWith( replies: defaultTheme.otherMessageTheme.replies.copyWith(
color: theme.accentColor,
),
messageLinks: TextStyle(
color: theme.accentColor, color: theme.accentColor,
), ),
), ),
@@ -315,6 +321,9 @@ class StreamChatThemeData {
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
fontSize: 12, fontSize: 12,
), ),
messageLinks: TextStyle(
color: accentColor,
),
messageBackgroundColor: isDark ? Colors.black : Colors.white, messageBackgroundColor: isDark ? Colors.black : Colors.white,
avatarTheme: AvatarTheme( avatarTheme: AvatarTheme(
borderRadius: BorderRadius.circular(20), borderRadius: BorderRadius.circular(20),
+1
View File
@@ -123,6 +123,7 @@ class _VideoAttachmentState extends State<VideoAttachment> {
), ),
if (widget.attachment.title != null) if (widget.attachment.title != null)
Material( Material(
color: widget.messageTheme.messageBackgroundColor,
child: AttachmentTitle( child: AttachmentTitle(
messageTheme: widget.messageTheme, messageTheme: widget.messageTheme,
attachment: widget.attachment, attachment: widget.attachment,