combine7<T, A, B, C, D, E, F, G> static method

FlowState<T> combine7<T, A, B, C, D, E, F, G>(
  1. FlowState<A> one,
  2. FlowState<B> two,
  3. FlowState<C> three,
  4. FlowState<D> four,
  5. FlowState<E> five,
  6. FlowState<F> six,
  7. FlowState<G> seven, [
  8. T combiner(
    1. A a,
    2. B b,
    3. C c,
    4. D d,
    5. E e,
    6. F f,
    7. G g,
    )?,
])

Implementation

static FlowState<T> combine7<T, A, B, C, D, E, F, G>(
  FlowState<A> one,
  FlowState<B> two,
  FlowState<C> three,
  FlowState<D> four,
  FlowState<E> five,
  FlowState<F> six,
  FlowState<G> seven, [
  T Function(A a, B b, C c, D d, E e, F f, G g)? combiner,
]) {
  combiner ??= (a, b, c, d, e, f, g) => [a, b, c, d, e, f, g] as T;
  final combinedStream = Rx.combineLatest7<A, B, C, D, E, F, G, T>(
    one.stream,
    two.stream,
    three.stream,
    four.stream,
    five.stream,
    six.stream,
    seven.stream,
    combiner,
  );
  final initialCombinedValue = combiner(
    one.current,
    two.current,
    three.current,
    four.current,
    five.current,
    six.current,
    seven.current,
  );
  return FlowState<T>(initialCombinedValue).._subject.addStream(combinedStream);
}