Injector.fromModule constructor

Injector.fromModule({
  1. required Module module,
  2. String? name,
  3. Injector? parent,
})

Creates an Injector from a Module.

Implementation

factory Injector.fromModule(
    {required Module module, String? name, Injector? parent}) {
  return Injector(
      name: name, bindFunc: (bind) => bind.install(module), parent: parent);
}