CombineQueryResultList<T> extension
Combining results
combine over a list of results of one type — a QueriesObserver's
results, say, one per item of a dynamic list — by the same rules as a
record of them, and combineWith for that list plus one more source of
another type.
final details = itemResults.combineWith(
listResult,
(items, list) => Page(title: list.title, items: items),
);
- on
-
- List<
QueryResult< T> >
- List<
Methods
-
combine<
R> (R combiner(List< T> values), {CombineMemo<R> ? memo, List<Object?> ? keys}) → CombinedResult<R> -
Available on List<
What the list amounts to together — see CombinedResult for the rules: a source that failed with nothing to show wins, otherwise one without data makes it pending, otherwiseQueryResult< , provided by the CombineQueryResultList extensionT> >combinergets every value in order. An empty list is data. With amemo,combinermust be a function of the sources andkeysalone — see CombineMemo. -
combineWith<
A, R> (QueryResult< A> other, R combiner(List<T> values, A other), {CombineMemo<R> ? memo, List<Object?> ? keys}) → CombinedResult<R> -
Available on List<
This list and one more source of another type, as one combination — the query a dynamic set of queries was derived from, say: the details of each item and the query that listed the items.QueryResult< , provided by the CombineQueryResultList extensionT> >