Closed YouSour closed 3 years ago
Hey @YouSour How do you resolve this problem?
Basically, we do a subscription in the initState() and stop the subscription in dispose() of the StatefulWidget.
@keepjhonnying you may read my article on Medium, https://link.medium.com/81anzxcGJib.
@keepjhonnying dispose() on subscription and cancel() on collection listen , it completely shut down 😄 Example :
SubscriptionHandler _projectSubscriptionHandler;
StreamSubscription<Map<String, dynamic>> _projectCollectionListener;
if (_projectMemberSubscriptionHandler != null)
_projectMemberSubscriptionHandler.stop();
_projectMemberCollectionListener.cancel();
hi , @tanutapi , i got some problem with meteor.collections listen , i try to stop listen to data when i go to other screen , but i don't know how to stop it?