zipWith<S, R> method
Returns a Stream that combines the current stream together with another stream using a given zipper function.
Example
Stream.fromIterable([1])
.zipWith(Stream.fromIterable([2]), (one, two) => one + two)
.listen(print); // prints 3
Implementation
Stream<R> zipWith<S, R>(Stream<S> other, R Function(T t, S s) zipper) {
final stream = ZipStream.zip2(this, other, zipper);
return isBroadcast
? stream.asBroadcastStream(onCancel: (s) => s.cancel())
: stream;
}