Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update ChatPage using latest API #44

Merged
merged 3 commits into from
Jul 31, 2019
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add connection cancel and dispose
  • Loading branch information
ChangJoo Park committed Jul 8, 2019
commit 926c4c47abad69260f650215f4ec682291974982
2 changes: 2 additions & 0 deletions example/lib/ChatPage.dart
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,9 @@ class _ChatPage extends State<ChatPage> {
void dispose() {
// Avoid memory leak (`setState` after dispose) and disconnect
if (isConnected) {
connection.cancel();
connection.dispose();
connection = null;
print('we are disconnecting locally!');
}

Expand Down