stream property

Exposes the Stream created by a StreamProvider.

The stream obtained is not strictly identical to the stream created. Instead, this stream is always a broadcast stream.

The stream obtained may change over time, if the StreamProvider is re-evaluated, such as when it is using ProviderReference.watch and the provider listened changes, or on ProviderContainer.refresh.

If the StreamProvider was overridden using overrideWithValue, a stream will be generated and manipulated based on the AsyncValue used.

Implementation

@override
AutoDisposeProviderBase<Stream<T>, Stream<T>> get stream {
  return _stream ??= _AutoDisposeCreatedStreamProvider(
    this,
    name: name == null ? null : '$name.stream',
  );
}