Package to help disposing Streams and Sinks.

Instantiate a disposable with

Add StreamSubscriptions or Sinks to it by calling add

In the Stateful's Widget dispose method or equivalent, we can call

To safely dispose every subscription.

void add Adds a Sink or a StreamSusbcription to the disposable. Throws an Error if another type of object is added or if the disposable has already been disposed.

Future<void> didDispose Future that completes when the StreamDisposable is disposed.

bool isDisposed Boolean value to check if the disposable has been disposed.