From 45c1e31509da2200ce8499247b155f82cdc9deca Mon Sep 17 00:00:00 2001 From: Salvatore Giordano Date: Wed, 14 Apr 2021 14:29:47 +0200 Subject: [PATCH] fix warning --- packages/stream_chat/lib/src/client.dart | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/stream_chat/lib/src/client.dart b/packages/stream_chat/lib/src/client.dart index 816d780c..e951ed78 100644 --- a/packages/stream_chat/lib/src/client.dart +++ b/packages/stream_chat/lib/src/client.dart @@ -1399,12 +1399,12 @@ class ClientState { .map((e) => e.me) .listen((user) { _userController.add(user); - if (user!.totalUnreadCount != null) { - _totalUnreadCountController.add(user.totalUnreadCount); + if (user?.totalUnreadCount != null) { + _totalUnreadCountController.add(user?.totalUnreadCount); } - if (user.unreadChannels != null) { - _unreadChannelsController.add(user.unreadChannels); + if (user?.unreadChannels != null) { + _unreadChannelsController.add(user?.unreadChannels); } }), _client