diff --git a/CHANGELOG.md b/CHANGELOG.md index e4b7ea55..cd82fe8c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.1.10 + +- Do not automatically dispose Client object when disposing StreamChat widget + ## 0.1.9 - Fix message ui overflow diff --git a/README.md b/README.md index 86fe3a40..564fb165 100644 --- a/README.md +++ b/README.md @@ -30,7 +30,7 @@ The example is available under the [example](https://github.com/GetStream/stream ```yaml dependencies: - stream_chat_flutter: ^0.1.7 + stream_chat_flutter: ^0.1.10 ``` You should then run `flutter packages get` diff --git a/example/lib/main.dart b/example/lib/main.dart index 6a1660ca..a22b3eed 100644 --- a/example/lib/main.dart +++ b/example/lib/main.dart @@ -31,11 +31,9 @@ class MyApp extends StatelessWidget { brightness: Brightness.light, ), ), - home: Container( - child: StreamChat( - client: client, - child: ChannelListPage(), - ), + home: StreamChat( + client: client, + child: ChannelListPage(), ), ); } diff --git a/lib/src/stream_chat.dart b/lib/src/stream_chat.dart index 2c5d18a5..a70a4506 100644 --- a/lib/src/stream_chat.dart +++ b/lib/src/stream_chat.dart @@ -216,7 +216,6 @@ class StreamChatState extends State { @override void dispose() { - widget.client.dispose(); _subscriptions.forEach((s) => s.cancel()); _queryChannelsLoadingController.close(); super.dispose(); diff --git a/pubspec.yaml b/pubspec.yaml index 18362c8f..850cc7f0 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,7 +1,7 @@ name: stream_chat_flutter homepage: https://github.com/GetStream/stream-chat-flutter description: Stream Chat official Flutter SDK. Build your own chat experience using Dart and Flutter. -version: 0.1.9 +version: 0.1.10 environment: sdk: ">=2.3.0 <3.0.0"