You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello. I am having trouble stopping listening to the event. Specifically, I have a dialog, when opening the dialog (a statefull widget), in initState() I declare listening to the 'ABC' event. At the time of closing the dialog, specifically in dispose(), I off listening. When it first opens the dialog, it works smoothly. However, from the 2nd time on, I did not receive any messages from the event no matter what I registered to listen. Currently I have solved it temporarily by adding the code to remove eventName in _listeners at the end of off(...) function. I post to hope you find and have a fix for this case that is better than my way, because my way is only temporary and I don't know if my way has a bug or not. Thank you.
if (_listeners.containsKey(eventName)) {
_listeners.remove(eventName);
}
The text was updated successfully, but these errors were encountered:
Hello. I am having trouble stopping listening to the event. Specifically, I have a dialog, when opening the dialog (a statefull widget), in
initState()
I declare listening to the 'ABC' event. At the time of closing the dialog, specifically indispose()
, Ioff
listening. When it first opens the dialog, it works smoothly. However, from the 2nd time on, I did not receive any messages from the event no matter what I registered to listen. Currently I have solved it temporarily by adding the code to removeeventName
in_listeners
at the end ofoff(...)
function. I post to hope you find and have a fix for this case that is better than my way, because my way is only temporary and I don't know if my way has a bug or not. Thank you.The text was updated successfully, but these errors were encountered: