FStream<T>.ofFuture constructor

FStream<T>.ofFuture(
  1. Future<T?> _firstFuture,
  2. Stream<T> after, [
  3. String? debugName
])

The constructor resolves the first item and then passes it in the after stream, while also setting it as _first

Implementation

FStream.ofFuture(this._firstFuture, Stream<T> after, [this.debugName])
    : after = streamOfNullableFuture<T>(_firstFuture).followedBy(after) {
  _firstFuture.then((resolved) {
    _isResolved = true;
    _first = resolved;
  });
}