Hi guys. Is there an equivalent to `Flow.withLates...
# coroutines
u
Hi guys. Is there an equivalent to
Flow.withLatestFrom(other: Flow<B>, transform: suspend (A,B) -> R
) that takes several
other
Flows? I need values emitted downstream only when source flow changes.
It doesn't do several automatically but shouldn't be hard to chain.
u
It seems that this operator emits values every time there is a new value from one of the combined flow. Correct me if I'm wrong
a
do you want to wait until all of them emit? maybe
zip
is what you’re after?
d
@ubu Yes
If you have a two flows. • a, b, c, d • 1, 2, 3, 4 It'll emit something like, a1, a2, b2, c2, etc. What do you want to emit?
u
I will repost this question in few minutes.
@Dominaezzz, thanks for taking interest!