ValueStream<T>.of constructor

ValueStream<T>.of(
  1. FutureOr<T?> first, [
  2. Stream<T>? after,
  3. String? debugName
])

Implementation

factory ValueStream.of(FutureOr<T?> first, [Stream<T>? after, String? debugName]) {
  after ??= Stream.empty();
  if (first is Future<T?>) {
    return FStream<T>.ofFuture(first, after, debugName);
  } else {
    return HStream<T?>(first.resolveOrNull(), after, debugName) as ValueStream<T>;
  }
}