factory<T extends BlocBase> static method

Bind<T> factory<T extends BlocBase>(
  1. T factoryFunction(
    1. Injector i
    ), {
  2. bool export = false,
})

Implementation

static Bind<T> factory<T extends BlocBase>(
  T Function(Injector<dynamic> i) factoryFunction, {
  bool export = false,
}) {
  return Bind<T>(factoryFunction, export: export, isLazy: true, isSingleton: false, onDispose: (bloc) {
    bloc.close();
  }, selector: (bloc) {
    return bloc.stream;
  });
}