combine5<T, A, B, C, D, E> static method
FlowState<T>
combine5<
T, A, B, C, D, E>( - FlowState<A> one,
- FlowState<B> two,
- FlowState<C> three,
- FlowState<D> four,
- FlowState<E> five, [
- T combiner(
- A a,
- B b,
- C c,
- D d,
- E e,
)?,
])
Implementation
static FlowState<T> combine5<T, A, B, C, D, E>(
FlowState<A> one,
FlowState<B> two,
FlowState<C> three,
FlowState<D> four,
FlowState<E> five, [
T Function(A a, B b, C c, D d, E e)? combiner,
]) {
combiner ??= (a, b, c, d, e) => [a, b, c, d, e] as T;
final combinedStream = Rx.combineLatest5<A, B, C, D, E, T>(
one.stream,
two.stream,
three.stream,
four.stream,
five.stream,
combiner,
);
final initialCombinedValue = combiner(
one.current,
two.current,
three.current,
four.current,
five.current,
);
return FlowState<T>(initialCombinedValue).._subject.addStream(combinedStream);
}