instantiateSingletonBinds method

  1. @mustCallSuper
void instantiateSingletonBinds(
  1. List<SingletonBind<Object>> singletons,
  2. Injector injector
)
inherited

Implementation

@mustCallSuper
void instantiateSingletonBinds(
    List<SingletonBind> singletons, Injector injector) {
  final filteredList =
      _binds.where((bind) => !bind.isLazy && !_containBind(singletons, bind));
  for (final bindElement in filteredList) {
    var b = bindElement.factoryFunction(injector);
    if (!_singletonBinds.containsKey(b.runtimeType)) {
      _singletonBinds[b.runtimeType] =
          SingletonBind(value: b, bind: bindElement);
    }
  }
}