How can I cancel a StreamSubscription
in my Notifier class?
#3752
Unanswered
Biplab-Dutta
asked this question in
Q&A
Replies: 1 comment 2 replies
-
Notifiers have a ref property, so you can use ref.onDispose |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have a class that extends
AutoDisposeNotifier
and I have aNotifierProvider.autoDispose
as well. How can I cancel the stream subscription when the notifier is disposed. Or when the page is disposed. I can't doref.onDispose
in my NotifierProvider as it doesn't provide ref object in the callback. Is there any other recommended approach?Beta Was this translation helpful? Give feedback.
All reactions