InjectorWidget.bind constructor

InjectorWidget.bind({
  1. Key? key,
  2. required BindFunc bindFunc,
  3. required Widget child,
  4. bool autoDispose = true,
})

Creates an InjectorWidget based on a BinderFunc.

Implementation

factory InjectorWidget.bind({
  Key? key,
  required BindFunc bindFunc,
  required Widget child,
  bool autoDispose = true,
}) {
  return InjectorWidget(
      key: key,
      injector: Injector(bindFunc: bindFunc),
      child: child,
      autoDispose: autoDispose);
}