dispose method

void dispose()

Disposes of the reactive value and closes the stream.

Call this when you're done with the Rx to prevent memory leaks.

Implementation

void dispose() {
  _listeners.clear();
  _streamController.close();
}