Merge branch 'master' into feature/new-ui

This commit is contained in:
Salvatore Giordano
2020-07-21 11:30:08 +02:00
6 changed files with 33 additions and 15 deletions
+4
View File
@@ -1,3 +1,7 @@
## 0.2.2
- Add `messageLinks` property to `MessageTheme` to customize links color
## 0.2.1+2 ## 0.2.1+2
- Update llc dependency - Update llc dependency
+1
View File
@@ -49,6 +49,7 @@ class MessageText extends StatelessWidget {
), ),
), ),
).copyWith( ).copyWith(
a: messageTheme.messageLinks,
p: messageTheme.messageText, p: messageTheme.messageText,
), ),
); );
+2 -2
View File
@@ -124,7 +124,7 @@ class StreamChatState extends State<StreamChat> with WidgetsBindingObserver {
messageBackgroundColor: messageBackgroundColor:
themeData?.ownMessageTheme?.messageBackgroundColor, themeData?.ownMessageTheme?.messageBackgroundColor,
messageAuthor: themeData?.ownMessageTheme?.messageAuthor, messageAuthor: themeData?.ownMessageTheme?.messageAuthor,
messageMention: themeData?.ownMessageTheme?.messageMention, messageLinks: themeData?.ownMessageTheme?.messageLinks,
avatarTheme: defaultTheme.ownMessageTheme.avatarTheme.copyWith( avatarTheme: defaultTheme.ownMessageTheme.avatarTheme.copyWith(
constraints: themeData?.ownMessageTheme?.avatarTheme?.constraints, constraints: themeData?.ownMessageTheme?.avatarTheme?.constraints,
borderRadius: themeData?.ownMessageTheme?.avatarTheme?.borderRadius, borderRadius: themeData?.ownMessageTheme?.avatarTheme?.borderRadius,
@@ -137,7 +137,7 @@ class StreamChatState extends State<StreamChat> with WidgetsBindingObserver {
messageBackgroundColor: messageBackgroundColor:
themeData?.otherMessageTheme?.messageBackgroundColor, themeData?.otherMessageTheme?.messageBackgroundColor,
messageAuthor: themeData?.otherMessageTheme?.messageAuthor, messageAuthor: themeData?.otherMessageTheme?.messageAuthor,
messageMention: themeData?.otherMessageTheme?.messageMention, messageLinks: themeData?.otherMessageTheme?.messageLinks,
avatarTheme: defaultTheme.otherMessageTheme.avatarTheme.copyWith( avatarTheme: defaultTheme.otherMessageTheme.avatarTheme.copyWith(
constraints: themeData?.otherMessageTheme?.avatarTheme?.constraints, constraints: themeData?.otherMessageTheme?.avatarTheme?.constraints,
borderRadius: themeData?.otherMessageTheme?.avatarTheme?.borderRadius, borderRadius: themeData?.otherMessageTheme?.avatarTheme?.borderRadius,
+24 -12
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,
), ),
), ),
@@ -168,8 +174,8 @@ class StreamChatThemeData {
this.ownMessageTheme.messageText, this.ownMessageTheme.messageText,
messageAuthor: ownMessageTheme?.messageAuthor ?? messageAuthor: ownMessageTheme?.messageAuthor ??
this.ownMessageTheme.messageAuthor, this.ownMessageTheme.messageAuthor,
messageMention: ownMessageTheme?.messageMention ?? messageLinks: ownMessageTheme?.messageLinks ??
this.ownMessageTheme.messageMention, this.ownMessageTheme.messageLinks,
createdAt: createdAt:
ownMessageTheme?.createdAt ?? this.ownMessageTheme.createdAt, ownMessageTheme?.createdAt ?? this.ownMessageTheme.createdAt,
replies: ownMessageTheme?.replies ?? this.ownMessageTheme.replies, replies: ownMessageTheme?.replies ?? this.ownMessageTheme.replies,
@@ -184,8 +190,8 @@ class StreamChatThemeData {
this.otherMessageTheme.messageText, this.otherMessageTheme.messageText,
messageAuthor: otherMessageTheme?.messageAuthor ?? messageAuthor: otherMessageTheme?.messageAuthor ??
this.otherMessageTheme.messageAuthor, this.otherMessageTheme.messageAuthor,
messageMention: otherMessageTheme?.messageMention ?? messageLinks: otherMessageTheme?.messageLinks ??
this.otherMessageTheme.messageMention, this.otherMessageTheme.messageLinks,
createdAt: otherMessageTheme?.createdAt ?? createdAt: otherMessageTheme?.createdAt ??
this.otherMessageTheme.createdAt, this.otherMessageTheme.createdAt,
replies: replies:
@@ -295,6 +301,9 @@ class StreamChatThemeData {
width: 32, width: 32,
), ),
), ),
messageLinks: TextStyle(
color: accentColor,
),
), ),
otherMessageTheme: MessageTheme( otherMessageTheme: MessageTheme(
messageText: TextStyle( messageText: TextStyle(
@@ -312,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),
@@ -399,7 +411,7 @@ class AvatarTheme {
class MessageTheme { class MessageTheme {
final TextStyle messageText; final TextStyle messageText;
final TextStyle messageAuthor; final TextStyle messageAuthor;
final TextStyle messageMention; final TextStyle messageLinks;
final TextStyle createdAt; final TextStyle createdAt;
final TextStyle replies; final TextStyle replies;
final Color messageBackgroundColor; final Color messageBackgroundColor;
@@ -409,7 +421,7 @@ class MessageTheme {
this.replies, this.replies,
this.messageText, this.messageText,
this.messageAuthor, this.messageAuthor,
this.messageMention, this.messageLinks,
this.messageBackgroundColor, this.messageBackgroundColor,
this.avatarTheme, this.avatarTheme,
this.createdAt, this.createdAt,
@@ -418,7 +430,7 @@ class MessageTheme {
MessageTheme copyWith({ MessageTheme copyWith({
TextStyle messageText, TextStyle messageText,
TextStyle messageAuthor, TextStyle messageAuthor,
TextStyle messageMention, TextStyle messageLinks,
TextStyle createdAt, TextStyle createdAt,
TextStyle replies, TextStyle replies,
Color messageBackgroundColor, Color messageBackgroundColor,
@@ -428,7 +440,7 @@ class MessageTheme {
MessageTheme( MessageTheme(
messageText: messageText ?? this.messageText, messageText: messageText ?? this.messageText,
messageAuthor: messageAuthor ?? this.messageAuthor, messageAuthor: messageAuthor ?? this.messageAuthor,
messageMention: messageMention ?? this.messageMention, messageLinks: messageLinks ?? this.messageLinks,
createdAt: createdAt ?? this.createdAt, createdAt: createdAt ?? this.createdAt,
messageBackgroundColor: messageBackgroundColor:
messageBackgroundColor ?? this.messageBackgroundColor, messageBackgroundColor ?? this.messageBackgroundColor,
+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,
+1 -1
View File
@@ -1,7 +1,7 @@
name: stream_chat_flutter name: stream_chat_flutter
homepage: https://github.com/GetStream/stream-chat-flutter homepage: https://github.com/GetStream/stream-chat-flutter
description: Stream Chat official Flutter SDK. Build your own chat experience using Dart and Flutter. description: Stream Chat official Flutter SDK. Build your own chat experience using Dart and Flutter.
version: 0.2.1+2 version: 0.2.2
repository: https://github.com/GetStream/stream-chat-flutter repository: https://github.com/GetStream/stream-chat-flutter
issue_tracker: https://github.com/GetStream/stream-chat-flutter/issues issue_tracker: https://github.com/GetStream/stream-chat-flutter/issues