Merge pull request #172 from GetStream/feature/messageInputDecoration
This commit is contained in:
@@ -1,3 +1,7 @@
|
|||||||
|
## 0.2.17
|
||||||
|
|
||||||
|
- Expose messageInputDecoration as part of the theme
|
||||||
|
|
||||||
## 0.2.16
|
## 0.2.16
|
||||||
|
|
||||||
- Do not wrap channel preview builder. Users will have to implement they're custom onTap/onLongPress implementation
|
- Do not wrap channel preview builder. Users will have to implement they're custom onTap/onLongPress implementation
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
bb5f9103d9045cd6244bcae1f5f343e5
|
c3e639ccf9b069e37a7d1345194e6b99
|
||||||
@@ -38,7 +38,7 @@ PODS:
|
|||||||
- Firebase/Messaging (6.33.0):
|
- Firebase/Messaging (6.33.0):
|
||||||
- Firebase/CoreOnly
|
- Firebase/CoreOnly
|
||||||
- FirebaseMessaging (~> 4.7.0)
|
- FirebaseMessaging (~> 4.7.0)
|
||||||
- firebase_core (0.5.1):
|
- firebase_core (0.5.2-1):
|
||||||
- Firebase/CoreOnly (~> 6.33.0)
|
- Firebase/CoreOnly (~> 6.33.0)
|
||||||
- Flutter
|
- Flutter
|
||||||
- firebase_messaging (7.0.3):
|
- firebase_messaging (7.0.3):
|
||||||
@@ -227,7 +227,7 @@ SPEC CHECKSUMS:
|
|||||||
DKPhotoGallery: fdfad5125a9fdda9cc57df834d49df790dbb4179
|
DKPhotoGallery: fdfad5125a9fdda9cc57df834d49df790dbb4179
|
||||||
file_picker: 3e6c3790de664ccf9b882732d9db5eaf6b8d4eb1
|
file_picker: 3e6c3790de664ccf9b882732d9db5eaf6b8d4eb1
|
||||||
Firebase: 8db6f2d1b2c5e2984efba4949a145875a8f65fe5
|
Firebase: 8db6f2d1b2c5e2984efba4949a145875a8f65fe5
|
||||||
firebase_core: aa25a5dc6b492ecab37587c53d8420135f0cac90
|
firebase_core: 7423d688a1c6f2f2d859d64ae26991be39989781
|
||||||
firebase_messaging: 0aea2cd5885b65e19ede58ee3507f485c992cc75
|
firebase_messaging: 0aea2cd5885b65e19ede58ee3507f485c992cc75
|
||||||
FirebaseCore: d889d9e12535b7f36ac8bfbf1713a0836a3012cd
|
FirebaseCore: d889d9e12535b7f36ac8bfbf1713a0836a3012cd
|
||||||
FirebaseCoreDiagnostics: 770ac5958e1372ce67959ae4b4f31d8e127c3ac1
|
FirebaseCoreDiagnostics: 770ac5958e1372ce67959ae4b4f31d8e127c3ac1
|
||||||
@@ -256,8 +256,8 @@ SPEC CHECKSUMS:
|
|||||||
SwiftyGif: e466e86c660d343357ab944a819a101c4127cb40
|
SwiftyGif: e466e86c660d343357ab944a819a101c4127cb40
|
||||||
url_launcher: 6fef411d543ceb26efce54b05a0a40bfd74cbbef
|
url_launcher: 6fef411d543ceb26efce54b05a0a40bfd74cbbef
|
||||||
video_player: 9cc823b1d9da7e8427ee591e8438bfbcde500e6e
|
video_player: 9cc823b1d9da7e8427ee591e8438bfbcde500e6e
|
||||||
wakelock: 0d4a70faf8950410735e3f61fb15d517c8a6efc4
|
wakelock: bfc7955c418d0db797614075aabbc58a39ab5107
|
||||||
|
|
||||||
PODFILE CHECKSUM: eb001256612a59f8f9e4d083ad8b9671e69dd184
|
PODFILE CHECKSUM: eb001256612a59f8f9e4d083ad8b9671e69dd184
|
||||||
|
|
||||||
COCOAPODS: 1.10.0.rc.1
|
COCOAPODS: 1.10.0
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
name: example
|
name: example
|
||||||
description: A new Flutter project.
|
description: A new Flutter project.
|
||||||
version: 1.0.26+27
|
version: 1.0.27+28
|
||||||
|
|
||||||
environment:
|
environment:
|
||||||
sdk: ">=2.2.2 <3.0.0"
|
sdk: ">=2.2.2 <3.0.0"
|
||||||
|
|||||||
@@ -263,13 +263,15 @@ class MessageInputState extends State<MessageInput> {
|
|||||||
},
|
},
|
||||||
style: widget.inputTextStyle ?? Theme.of(context).textTheme.bodyText2,
|
style: widget.inputTextStyle ?? Theme.of(context).textTheme.bodyText2,
|
||||||
autofocus: widget.autofocus,
|
autofocus: widget.autofocus,
|
||||||
decoration: InputDecoration(
|
decoration:
|
||||||
hintText: 'Write a message',
|
StreamChatTheme.of(context).channelTheme.messageInputDecoration ??
|
||||||
hintStyle:
|
InputDecoration(
|
||||||
widget.inputTextStyle ?? Theme.of(context).textTheme.bodyText2,
|
hintText: 'Write a message',
|
||||||
prefixText: ' ',
|
hintStyle: widget.inputTextStyle ??
|
||||||
border: InputBorder.none,
|
Theme.of(context).textTheme.bodyText2,
|
||||||
),
|
prefixText: ' ',
|
||||||
|
border: InputBorder.none,
|
||||||
|
),
|
||||||
textCapitalization: TextCapitalization.sentences,
|
textCapitalization: TextCapitalization.sentences,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -116,6 +116,7 @@ class StreamChatState extends State<StreamChat> with WidgetsBindingObserver {
|
|||||||
inputGradient: themeData?.channelTheme?.inputGradient,
|
inputGradient: themeData?.channelTheme?.inputGradient,
|
||||||
messageInputButtonTheme:
|
messageInputButtonTheme:
|
||||||
themeData?.channelTheme?.messageInputButtonTheme,
|
themeData?.channelTheme?.messageInputButtonTheme,
|
||||||
|
messageInputDecoration: themeData?.channelTheme?.messageInputDecoration,
|
||||||
),
|
),
|
||||||
ownMessageTheme: defaultTheme.ownMessageTheme.copyWith(
|
ownMessageTheme: defaultTheme.ownMessageTheme.copyWith(
|
||||||
replies: themeData?.ownMessageTheme?.replies,
|
replies: themeData?.ownMessageTheme?.replies,
|
||||||
|
|||||||
@@ -167,6 +167,8 @@ class StreamChatThemeData {
|
|||||||
channelTheme.inputGradient ?? this.channelTheme.inputGradient,
|
channelTheme.inputGradient ?? this.channelTheme.inputGradient,
|
||||||
inputBackground: channelTheme.inputBackground ??
|
inputBackground: channelTheme.inputBackground ??
|
||||||
this.channelTheme.inputBackground,
|
this.channelTheme.inputBackground,
|
||||||
|
messageInputDecoration: channelTheme.messageInputDecoration ??
|
||||||
|
this.channelTheme.messageInputDecoration,
|
||||||
) ??
|
) ??
|
||||||
this.channelTheme,
|
this.channelTheme,
|
||||||
ownMessageTheme: ownMessageTheme?.copyWith(
|
ownMessageTheme: ownMessageTheme?.copyWith(
|
||||||
@@ -247,6 +249,12 @@ class StreamChatThemeData {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
channelTheme: ChannelTheme(
|
channelTheme: ChannelTheme(
|
||||||
|
messageInputDecoration: InputDecoration(
|
||||||
|
hintText: 'Write a message',
|
||||||
|
hintStyle: theme.textTheme.bodyText2,
|
||||||
|
prefixText: ' ',
|
||||||
|
border: InputBorder.none,
|
||||||
|
),
|
||||||
messageInputButtonIconTheme: theme.iconTheme.copyWith(
|
messageInputButtonIconTheme: theme.iconTheme.copyWith(
|
||||||
color: accentColor,
|
color: accentColor,
|
||||||
),
|
),
|
||||||
@@ -354,12 +362,16 @@ class ChannelTheme {
|
|||||||
/// Background color of [MessageInput]
|
/// Background color of [MessageInput]
|
||||||
final Color inputBackground;
|
final Color inputBackground;
|
||||||
|
|
||||||
|
/// InputDecoration of [MessageInput]
|
||||||
|
final InputDecoration messageInputDecoration;
|
||||||
|
|
||||||
ChannelTheme({
|
ChannelTheme({
|
||||||
this.channelHeaderTheme,
|
this.channelHeaderTheme,
|
||||||
this.messageInputButtonIconTheme,
|
this.messageInputButtonIconTheme,
|
||||||
this.messageInputButtonTheme,
|
this.messageInputButtonTheme,
|
||||||
this.inputBackground,
|
this.inputBackground,
|
||||||
this.inputGradient,
|
this.inputGradient,
|
||||||
|
this.messageInputDecoration,
|
||||||
});
|
});
|
||||||
|
|
||||||
/// Creates a copy of [ChannelTheme] with specified attributes overridden.
|
/// Creates a copy of [ChannelTheme] with specified attributes overridden.
|
||||||
@@ -369,6 +381,7 @@ class ChannelTheme {
|
|||||||
ButtonThemeData messageInputButtonTheme,
|
ButtonThemeData messageInputButtonTheme,
|
||||||
Gradient inputGradient,
|
Gradient inputGradient,
|
||||||
Color inputBackground,
|
Color inputBackground,
|
||||||
|
InputDecoration messageInputDecoration,
|
||||||
}) =>
|
}) =>
|
||||||
ChannelTheme(
|
ChannelTheme(
|
||||||
channelHeaderTheme: channelHeaderTheme?.copyWith(
|
channelHeaderTheme: channelHeaderTheme?.copyWith(
|
||||||
@@ -386,6 +399,8 @@ class ChannelTheme {
|
|||||||
messageInputButtonTheme ?? this.messageInputButtonTheme,
|
messageInputButtonTheme ?? this.messageInputButtonTheme,
|
||||||
inputGradient: inputGradient ?? this.inputGradient,
|
inputGradient: inputGradient ?? this.inputGradient,
|
||||||
inputBackground: inputBackground ?? this.inputBackground,
|
inputBackground: inputBackground ?? this.inputBackground,
|
||||||
|
messageInputDecoration:
|
||||||
|
messageInputDecoration ?? this.messageInputDecoration,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -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.16
|
version: 0.2.17
|
||||||
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
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user