From b3860d6a9396614c19b236917467b8a70bc1561f Mon Sep 17 00:00:00 2001 From: Salvatore Giordano Date: Fri, 10 Apr 2020 12:17:41 +0200 Subject: [PATCH 1/2] add message configuration properties to message list view --- lib/src/message_list_view.dart | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/lib/src/message_list_view.dart b/lib/src/message_list_view.dart index dea5a70c..2476c69e 100644 --- a/lib/src/message_list_view.dart +++ b/lib/src/message_list_view.dart @@ -63,6 +63,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 @@ -84,6 +87,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(); } @@ -138,6 +150,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), @@ -197,6 +214,9 @@ class _MessageListViewState extends State { nextMessage: nextMessage, onThreadTap: _onThreadTap, showOtherMessageUsername: widget.showOtherMessageUsername, + showVideoFullScreen: widget.showVideoFullScreen, + onMentionTap: widget.onMentionTap, + onMessageActions: widget.onMessageActions, ); } } @@ -330,6 +350,10 @@ class _MessageListViewState extends State { message: message, nextMessage: nextMessage, onThreadTap: _onThreadTap, + showVideoFullScreen: widget.showVideoFullScreen, + showOtherMessageUsername: widget.showOtherMessageUsername, + onMentionTap: widget.onMentionTap, + onMessageActions: widget.onMessageActions, ); } @@ -365,6 +389,10 @@ class _MessageListViewState extends State { message: message, nextMessage: null, onThreadTap: _onThreadTap, + showVideoFullScreen: widget.showVideoFullScreen, + showOtherMessageUsername: widget.showOtherMessageUsername, + onMentionTap: widget.onMentionTap, + onMessageActions: widget.onMessageActions, ); } From 779af5e206b8603b6d07dcf3d0318cafabeaae42 Mon Sep 17 00:00:00 2001 From: Salvatore Giordano Date: Fri, 10 Apr 2020 12:18:21 +0200 Subject: [PATCH 2/2] version bump --- CHANGELOG.md | 4 ++++ pubspec.yaml | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) 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/pubspec.yaml b/pubspec.yaml index baae5c67..772bda77 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"