combineData<R> method

R? combineData<R>(
  1. R combine(
    1. A a,
    2. B b
    )
)

Combines the data of all Results into a single value, using the provided combine function.

The method returns the combined data if all of the results hasData, otherwise it returns null.

Implementation

R? combineData<R>(R Function(A a, B b) combine) {
  return [$1, $2].combineData((data) => combine(data[0] as A, data[1] as B));
}