use normal notifications

This commit is contained in:
Salvatore Giordano
2020-03-20 15:38:23 +01:00
parent af16d90789
commit 64a40d60da
6 changed files with 162 additions and 9 deletions
+3 -2
View File
@@ -223,11 +223,12 @@ class StreamChatState extends State<StreamChat> with WidgetsBindingObserver {
@override
void didChangeAppLifecycleState(AppLifecycleState state) {
print('NEW STATE $state');
if (state == AppLifecycleState.paused) {
client.disconnect();
} else if (state == AppLifecycleState.resumed) {
client.connect();
if (client.wsConnectionStatus.value == ConnectionStatus.disconnected) {
client.connect();
}
}
}