fix issue #4 not disposing the client when disposing StreamChat widget

This commit is contained in:
Salvatore Giordano
2020-03-13 09:27:55 +01:00
parent e54b96a351
commit ae7979c423
2 changed files with 3 additions and 6 deletions
+3 -5
View File
@@ -28,11 +28,9 @@ class MyApp extends StatelessWidget {
brightness: Brightness.light,
),
),
home: Container(
child: StreamChat(
client: client,
child: ChannelListPage(),
),
home: StreamChat(
client: client,
child: ChannelListPage(),
),
);
}
-1
View File
@@ -240,7 +240,6 @@ class StreamChatState extends State<StreamChat> {
@override
void dispose() {
widget.client.dispose();
_subscriptions.forEach((s) => s.cancel());
_queryChannelsLoadingController.close();
_channelsController.close();