combine3<A, B, C, R> static method

CombineLatestNotifier<dynamic, R> combine3<A, B, C, R>(
  1. ResultListenable<A> notifierA,
  2. ResultListenable<B> notifierB,
  3. ResultListenable<C> notifierC, {
  4. required R combineData(
    1. A a,
    2. B b,
    3. C c
    ),
  5. R? data,
  6. Result<R>? result,
  7. Duration? expiration,
  8. ResultNotifierCallback<R>? onReset,
  9. R onErrorReturn(
    1. Object? error
    )?,
  10. bool autoReset = false,
  11. bool refreshOnError = false,
  12. bool ignoreLoading = false,
})

Constructs a CombineLatestNotifier that combines the data from the provided notifiers using the specified combineData function.

Implementation

static CombineLatestNotifier<dynamic, R> combine3<A, B, C, R>(
  ResultListenable<A> notifierA,
  ResultListenable<B> notifierB,
  ResultListenable<C> notifierC, {
  required R Function(A a, B b, C c) combineData,
  R? data,
  Result<R>? result,
  Duration? expiration,
  ResultNotifierCallback<R>? onReset,
  R Function(Object? error)? onErrorReturn,
  bool autoReset = false,
  bool refreshOnError = false,
  bool ignoreLoading = false,
}) {
  return CombineLatestNotifier<dynamic, R>(
    [notifierA, notifierB, notifierC],
    combineData: (data) => combineData(data[0] as A, data[1] as B, data[2] as C),
    data: data,
    result: result,
    expiration: expiration,
    onReset: onReset,
    onErrorReturn: onErrorReturn,
    autoReset: autoReset,
    refreshOnError: refreshOnError,
    ignoreLoading: ignoreLoading,
  );
}