From 80cbb266d2f8e85386143bc7f4a3adc1d9edb834 Mon Sep 17 00:00:00 2001 From: Salvatore Giordano Date: Wed, 19 May 2021 13:45:22 +0200 Subject: [PATCH] fix tests --- packages/stream_chat/lib/src/client.dart | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/stream_chat/lib/src/client.dart b/packages/stream_chat/lib/src/client.dart index b6efb6a5..05f2559b 100644 --- a/packages/stream_chat/lib/src/client.dart +++ b/packages/stream_chat/lib/src/client.dart @@ -1489,7 +1489,7 @@ class ClientState { void _updateUser(User? user) => _updateUsers([user]); /// The current user - OwnUser? get user => _userController.value; + OwnUser? get user => _userController.valueOrNull; /// The current user as a stream Stream get userStream => _userController.stream; @@ -1501,13 +1501,13 @@ class ClientState { Stream> get usersStream => _usersController.stream; /// The current unread channels count - int? get unreadChannels => _unreadChannelsController.value; + int? get unreadChannels => _unreadChannelsController.valueOrNull; /// The current unread channels count as a stream Stream get unreadChannelsStream => _unreadChannelsController.stream; /// The current total unread messages count - int? get totalUnreadCount => _totalUnreadCountController.value; + int? get totalUnreadCount => _totalUnreadCountController.valueOrNull; /// The current total unread messages count as a stream Stream get totalUnreadCountStream => _totalUnreadCountController.stream;