Merge branch 'master' into hotfix/mentionTap

This commit is contained in:
Salvatore Giordano
2020-12-09 15:15:33 +01:00
8 changed files with 36 additions and 14 deletions
+9 -7
View File
@@ -263,13 +263,15 @@ class MessageInputState extends State<MessageInput> {
},
style: widget.inputTextStyle ?? Theme.of(context).textTheme.bodyText2,
autofocus: widget.autofocus,
decoration: InputDecoration(
hintText: 'Write a message',
hintStyle:
widget.inputTextStyle ?? Theme.of(context).textTheme.bodyText2,
prefixText: ' ',
border: InputBorder.none,
),
decoration:
StreamChatTheme.of(context).channelTheme.messageInputDecoration ??
InputDecoration(
hintText: 'Write a message',
hintStyle: widget.inputTextStyle ??
Theme.of(context).textTheme.bodyText2,
prefixText: ' ',
border: InputBorder.none,
),
textCapitalization: TextCapitalization.sentences,
),
),
+1
View File
@@ -116,6 +116,7 @@ class StreamChatState extends State<StreamChat> with WidgetsBindingObserver {
inputGradient: themeData?.channelTheme?.inputGradient,
messageInputButtonTheme:
themeData?.channelTheme?.messageInputButtonTheme,
messageInputDecoration: themeData?.channelTheme?.messageInputDecoration,
),
ownMessageTheme: defaultTheme.ownMessageTheme.copyWith(
replies: themeData?.ownMessageTheme?.replies,
+15
View File
@@ -167,6 +167,8 @@ class StreamChatThemeData {
channelTheme.inputGradient ?? this.channelTheme.inputGradient,
inputBackground: channelTheme.inputBackground ??
this.channelTheme.inputBackground,
messageInputDecoration: channelTheme.messageInputDecoration ??
this.channelTheme.messageInputDecoration,
) ??
this.channelTheme,
ownMessageTheme: ownMessageTheme?.copyWith(
@@ -247,6 +249,12 @@ class StreamChatThemeData {
),
),
channelTheme: ChannelTheme(
messageInputDecoration: InputDecoration(
hintText: 'Write a message',
hintStyle: theme.textTheme.bodyText2,
prefixText: ' ',
border: InputBorder.none,
),
messageInputButtonIconTheme: theme.iconTheme.copyWith(
color: accentColor,
),
@@ -354,12 +362,16 @@ class ChannelTheme {
/// Background color of [MessageInput]
final Color inputBackground;
/// InputDecoration of [MessageInput]
final InputDecoration messageInputDecoration;
ChannelTheme({
this.channelHeaderTheme,
this.messageInputButtonIconTheme,
this.messageInputButtonTheme,
this.inputBackground,
this.inputGradient,
this.messageInputDecoration,
});
/// Creates a copy of [ChannelTheme] with specified attributes overridden.
@@ -369,6 +381,7 @@ class ChannelTheme {
ButtonThemeData messageInputButtonTheme,
Gradient inputGradient,
Color inputBackground,
InputDecoration messageInputDecoration,
}) =>
ChannelTheme(
channelHeaderTheme: channelHeaderTheme?.copyWith(
@@ -386,6 +399,8 @@ class ChannelTheme {
messageInputButtonTheme ?? this.messageInputButtonTheme,
inputGradient: inputGradient ?? this.inputGradient,
inputBackground: inputBackground ?? this.inputBackground,
messageInputDecoration:
messageInputDecoration ?? this.messageInputDecoration,
);
}