make username next to timestamp opt-in

This commit is contained in:
Salvatore Giordano
2020-04-08 09:48:29 +02:00
parent 946a99cab7
commit ff68d8f9b1
2 changed files with 10 additions and 1 deletions
+5
View File
@@ -61,6 +61,7 @@ class MessageListView extends StatefulWidget {
this.parentMessage,
this.threadBuilder,
this.onThreadTap,
this.showOtherMessageUsername = false,
}) : super(key: key);
/// Function used to build a custom message widget
@@ -79,6 +80,9 @@ class MessageListView extends StatefulWidget {
/// Parent message in case of a thread
final Message parentMessage;
/// If true show the other users username next to the timestamp of the message
final bool showOtherMessageUsername;
@override
_MessageListViewState createState() => _MessageListViewState();
}
@@ -193,6 +197,7 @@ class _MessageListViewState extends State<MessageListView> {
message: message,
nextMessage: nextMessage,
onThreadTap: _onThreadTap,
showOtherMessageUsername: widget.showOtherMessageUsername,
);
},
childCount: _messages.length + 2,