Search code examples
dartflutterrxdart

How to get StreamSubscription from StreamBuilder


When adding a listener to a RxDart PublishSubject I get a StreamSubscription. I can then use the StreamSubscription to pause and resume, is there any way to do that with a StreamBuilder?


Solution

  • No.

    You cannot pause listening to a Stream using StreamBuilder. If you want to, you will have to manually subscribe to your Stream and call pause yourself.