bindChangeNotifier<T> function
NotifierBinding<T>
bindChangeNotifier<T>({
- required Binding<
T> binding, - required ChangeNotifier changeNotifier,
- required VoidCallback notifyListener,
- required VoidCallback onChange,
Implementation
NotifierBinding<T> bindChangeNotifier<T>({
required Binding<T> binding,
required ChangeNotifier changeNotifier,
required VoidCallback notifyListener,
required VoidCallback onChange,
}) {
var notifierBinding = NotifierBinding<T>(
binding: binding,
notifier: changeNotifier,
notifyListener: notifyListener,
onChange: onChange,
);
binding.context.dependOnInheritedWidgetOfExactType<DependentManager>(
aspect: NotifierDependentExecutor<T>(notifierBinding),
);
return notifierBinding;
}