add custom theme example

This commit is contained in:
Salvatore Giordano
2020-02-28 13:28:01 +01:00
parent 7dc7261a06
commit 2d7ea2d3cd
5 changed files with 96 additions and 87 deletions
+4 -4
View File
@@ -218,7 +218,7 @@ class _MessageListViewState extends State<MessageListView> {
}
Widget _buildBottomMessage(
StreamChannelState channel,
StreamChannelState streamChannel,
Message previousMessage,
Message message,
BuildContext context,
@@ -243,9 +243,9 @@ class _MessageListViewState extends State<MessageListView> {
key: ValueKey<String>('BOTTOM-MESSAGE'),
onVisibilityChanged: (visibility) {
_isBottom = visibility.visibleBounds != Rect.zero;
if (_isBottom) {
if (channel.channel.state.unreadCount > 0) {
channel.channel.markRead();
if (_isBottom && streamChannel.channel.config.readEvents) {
if (streamChannel.channel.state.unreadCount > 0) {
streamChannel.channel.markRead();
}
}
},