combineLatest2<R, A, B> function
EventSubscriptionBuilder<R>
combineLatest2<R, A, B>(
- EventSubscriptionBuilder<
A> eventA, - EventSubscriptionBuilder<
B> eventB, - R combinator(
- A a,
- B b
Combines the latest values of each provided event using the combinator
into a single output EventHandler.
See combineLatest.
Implementation
EventSubscriptionBuilder<R> combineLatest2<R, A, B>(
EventSubscriptionBuilder<A> eventA,
EventSubscriptionBuilder<B> eventB,
R Function(A a, B b) combinator,
) {
return combineLatest(
[eventA, eventB],
(values) {
final a = values[0] as A;
final b = values[1] as B;
return combinator(a, b);
},
);
}