withLatestFrom7<A, B, C, D, E, F, G, R> method
Creates a Stream that emits when the source stream emits, combining the latest values from the eight streams using the provided function.
If any of latestFromStreams has not emitted any values, this stream will not emit either.
Example
Stream.fromIterable([1, 2])
.withLatestFrom7(
Stream.fromIterable([2, 3]),
Stream.fromIterable([3, 4]),
Stream.fromIterable([4, 5]),
Stream.fromIterable([5, 6]),
Stream.fromIterable([6, 7]),
Stream.fromIterable([7, 8]),
Stream.fromIterable([8, 9]),
(int a, int b, int c, int d, int e, int f, int g, int h) =>
a + b + c + d + e + f + g + h,
)
.listen(print); // prints 37 (due to the async nature of streams)
Implementation
Stream<R> withLatestFrom7<A, B, C, D, E, F, G, R>(
Stream<A> latestFromStream1,
Stream<B> latestFromStream2,
Stream<C> latestFromStream3,
Stream<D> latestFromStream4,
Stream<E> latestFromStream5,
Stream<F> latestFromStream6,
Stream<G> latestFromStream7,
R Function(T t, A a, B b, C c, D d, E e, F f, G g) fn,
) =>
WithLatestFromStreamTransformer.with7<T, A, B, C, D, E, F, G, R>(
latestFromStream1,
latestFromStream2,
latestFromStream3,
latestFromStream4,
latestFromStream5,
latestFromStream6,
latestFromStream7,
fn,
).bind(this);