put<T> static method

T put<T>(
  1. T instance
)

Registers an already created instance for the given type.

Implementation

static T put<T>(T instance) {
  _instances[T] = instance;
  if (instance is Injectable) {
    instance.onInit();
  }
  _notify('put', T);
  return instance;
}