Open YawarOsman opened 8 months ago
Hi, did you manage to solve the problem?
Hi, the problem itself has not fixed yet, but there a way to get rid of it, is that to refresh the page with browser's reload button not flutter's hot reload or hot restart
Hi, the problem itself has not fixed yet, but there a way to get rid of it, is that to refresh the page with browser's reload button not flutter's hot reload or hot restart
Thanks for the response, I'll try it that way.
I am encountering an issue in my Flutter web application where redundant event listeners are created every time the page is refreshed. I am using the socket.io package for Flutter to manage WebSocket connections, and it seems that a new listener for the event 'categoryUpdated' is registered every time the page is refreshed. This leads to multiple event handlers being invoked when the event is emitted, resulting in unexpected behavior.
Steps to Reproduce:
Expected Behavior:
Listeners for socket events should be registered only once and should persist across page refreshes. Subsequent refreshes should not result in the creation of additional listeners.
Actual Behavior:
Redundant listeners are created on each page refresh, leading to multiple invocations of event handlers when the event is emitted.
Additional Information:
Code Snippet: