ObserverProvider2<TInput1, TInput2, TOutput> constructor

ObserverProvider2<TInput1, TInput2, TOutput>({
  1. Key? key,
  2. required ObserverFn2<TInput1, TInput2, TOutput> observerFn,
  3. 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);
          });