ObserverProvider1<TInput, TOutput> constructor
ObserverProvider1<TInput, TOutput> ({
- Key? key,
- required ObserverFn1<
TInput, TOutput> observerFn, - Widget? child,
Implementation
ObserverProvider1({
Key? key,
required ObserverFn1<TInput, TOutput> observerFn,
Widget? child,
}) : super(
key: key,
child: child,
observerFn: (ctx) {
final in1 = Provider.of<TInput>(ctx);
return observerFn(ctx, in1);
});