flutterdartrxdart

Check if StreamSubscription is canceled


To put it simple:

How do i check if a StreamSubscription is canceled?

There is no

_myCustomSub.isCanceled

Solution

  • It seems you'd have to use one of two methods:

    1. onDone method - and retain in a seperate variable whether the stream was closed, or..
    2. cancel method - and await the future that signals that the StreamSubscription was canceled.

    Don't know of any other way.