instantiateSingletonBinds method

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

Implementation

@mustCallSuper
void instantiateSingletonBinds(
    List<BindEntry> singletons, Injector injector) {
  final filteredList = getProcessBinds()
      .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] = _generateBindEntry(b, bindElement);
    }
  }
}