Injector.map constructor

Injector.map(
  1. Map<Object, Object> providers, [
  2. Injector parent
])

Create a new Injector that uses a basic map of token->instance.

The map instance is copied (not referenced) into HashMap.identity.

Optionally specify the parent injector.

It is considered unsupported to provide Injector as a key or null as either a key or a value, and assertion may be thrown in development mode.

Implementation

factory Injector.map(
  Map<Object, Object> providers, [
  Injector parent,
]) = _MapInjector;