startWith method

Stream<T> startWith(
  1. T initial
)

Emits initial before any values or errors from the this stream.

If this stream is a broadcast stream the result will be as well. If this stream is a broadcast stream, the returned stream will only contain events of this stream that are emitted after the initial value has been emitted on the returned stream.

Implementation

Stream<T> startWith(T initial) =>
    startWithStream(Future.value(initial).asStream());