dispose method
void
dispose()
Releases resources used by this reactive instance.
This method closes the internal stream controller and should be called when the reactive instance is no longer needed to avoid memory leaks. After calling dispose, any attempt to listen to the stream will result in an error.
Example:
final counter = Reactive(0);
// ... use counter ...
// When done with the reactive instance:
counter.dispose();
Implementation
void dispose() {
_controller.close();
}