stream_disposable 0.0.1 copy "stream_disposable: ^0.0.1" to clipboard
stream_disposable: ^0.0.1 copied to clipboard

outdated

Package to help disposing Stream Subscriptions and Sink objects

Build Status

Stream Disposable #

Package to help disposing Streams and Sinks.

Usage #

Instantiate a disposable with

var disposable = StreamDisposable()

Add StreamSubscriptions or Sinks to it by calling add

var streamToDispose = Stream.fromIterable([1, 2, 3]);
disposable.add(streamToDispose.listen(print))

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

disposable.dispose(className: this.runtimeType.toString())

To safely dispose every subscription.

1
likes
0
pub points
67%
popularity

Publisher

verified publishergpalma.pt

Package to help disposing Stream Subscriptions and Sink objects

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

flutter

More

Packages that depend on stream_disposable