ObserverProvider2<TInput1, TInput2, TOutput> constructor
ObserverProvider2<TInput1, TInput2, TOutput> ({
- Key? key,
- required ObserverFn2<
TInput1, TInput2, TOutput> observerFn, - Widget? child,
Implementation
ObserverProvider2({
Key? key,
required ObserverFn2<TInput1, TInput2, TOutput> observerFn,
Widget? child,
}) : super(
key: key,
child: child,
observerFn: (ctx) {
final in1 = Provider.of<TInput1>(ctx);
final in2 = Provider.of<TInput2>(ctx);
return observerFn(ctx, in1, in2);
});