close method

Future<void> close()

Close the observable stream, and stop any future updates to observable properties or any stream subscribers.

Most of the time, this method doesn't need to be called. ObservableStream can clean-up automatically. This is always true if the original stream is a broadcast stream.

However, if the original stream is a single-subscription stream and you previously observed the stream's properties (data, value, error, hasError, status, etc.) but then stopped the observation (thereby pausing the stream), then this method can be used to ensure the original paused stream closes correctly.

Note that if you listen to this observable stream, the observable stream will be closed automatically when you cancel the subscription.

Implementation

Future<void> close() => _controller.close();