diff --git a/lib/src/stream_chat.dart b/lib/src/stream_chat.dart index f7eabff9..adc6b2ee 100644 --- a/lib/src/stream_chat.dart +++ b/lib/src/stream_chat.dart @@ -59,7 +59,8 @@ class StreamChat extends StatefulWidget { } } -class StreamChatState extends State { +class StreamChatState extends State + with AutomaticKeepAliveClientMixin { final List _subscriptions = []; Client get client => widget.client; final GlobalKey _navigatorKey = GlobalKey(); @@ -245,4 +246,7 @@ class StreamChatState extends State { _channelsController.close(); super.dispose(); } + + @override + bool get wantKeepAlive => true; }