diff --git a/CHANGELOG.md b/CHANGELOG.md index f36528a3..b3354e42 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.1.20 + +- Add message configuration properties to MessageListView + ## 0.1.19 - Fix video aspect ratio diff --git a/lib/src/message_list_view.dart b/lib/src/message_list_view.dart index 96853632..739194e4 100644 --- a/lib/src/message_list_view.dart +++ b/lib/src/message_list_view.dart @@ -64,6 +64,9 @@ class MessageListView extends StatefulWidget { this.threadBuilder, this.onThreadTap, this.showOtherMessageUsername = false, + this.showVideoFullScreen = true, + this.onMentionTap, + this.onMessageActions, }) : super(key: key); /// Function used to build a custom message widget @@ -85,6 +88,15 @@ class MessageListView extends StatefulWidget { /// If true show the other users username next to the timestamp of the message final bool showOtherMessageUsername; + /// True if the video player will allow fullscreen mode + final bool showVideoFullScreen; + + /// Function called on message mention tap + final void Function(User) onMentionTap; + + /// Function called on message long press + final Function(BuildContext, Message) onMessageActions; + @override _MessageListViewState createState() => _MessageListViewState(); } @@ -139,6 +151,11 @@ class _MessageListViewState extends State { nextMessage: null, onThreadTap: _onThreadTap, isParent: true, + showVideoFullScreen: widget.showVideoFullScreen, + showOtherMessageUsername: + widget.showOtherMessageUsername, + onMentionTap: widget.onMentionTap, + onMessageActions: widget.onMessageActions, ), Padding( padding: const EdgeInsets.symmetric(horizontal: 32), @@ -198,6 +215,9 @@ class _MessageListViewState extends State { nextMessage: nextMessage, onThreadTap: _onThreadTap, showOtherMessageUsername: widget.showOtherMessageUsername, + showVideoFullScreen: widget.showVideoFullScreen, + onMentionTap: widget.onMentionTap, + onMessageActions: widget.onMessageActions, ); } } @@ -333,6 +353,10 @@ class _MessageListViewState extends State { message: message, nextMessage: nextMessage, onThreadTap: _onThreadTap, + showVideoFullScreen: widget.showVideoFullScreen, + showOtherMessageUsername: widget.showOtherMessageUsername, + onMentionTap: widget.onMentionTap, + onMessageActions: widget.onMessageActions, ); } @@ -368,6 +392,10 @@ class _MessageListViewState extends State { message: message, nextMessage: null, onThreadTap: _onThreadTap, + showVideoFullScreen: widget.showVideoFullScreen, + showOtherMessageUsername: widget.showOtherMessageUsername, + onMentionTap: widget.onMentionTap, + onMessageActions: widget.onMessageActions, ); } diff --git a/pubspec.yaml b/pubspec.yaml index ea855aa7..1b3a8d02 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,7 +1,7 @@ name: 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. -version: 0.1.19 +version: 0.1.20 environment: sdk: ">=2.3.0 <3.0.0"