Injector.fromModules constructor

Injector.fromModules({
  1. required Iterable<Module> modules,
  2. String? name,
  3. Injector? parent,
})

Creates an Injector from a list of Module instances.

Implementation

factory Injector.fromModules(
    {required Iterable<Module> modules, String? name, Injector? parent}) {
  return Injector.fromModule(
      name: name, module: Module.compose(modules), parent: parent);
}