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
Describe the bug
If I try to launch this test it throws an exception. I discovered if I switch to normal stream instead of broadcast stream, everything works fine.
If I remove .broadcast from here it works as it should:
useStreamController creates a broadcast stream. It's part of its specs. That's not a bug but a feature.
Now, the issue is elsewhere. It appears that your addStream never complete.
So when the widget is unmounted, your addStream is still pending ; which causes the exception.
I'm not sure why your addStream fails, but if you change it to:
My guess is that this is a Dart bug. I don't see why your take(10) wouldn't cause addStream to stop once the last event is received on broadcast controllers.
Describe the bug
If I try to launch this test it throws an exception. I discovered if I switch to normal stream instead of broadcast stream, everything works fine.
If I remove
.broadcast
from here it works as it should:flutter_hooks/packages/flutter_hooks/lib/src/async.dart
Line 307 in 319679b
Exception
To Reproduce
Code sample
Expected behavior
Test should pass without errors.
The text was updated successfully, but these errors were encountered: