DependencyConfig.singleton constructor

DependencyConfig.singleton(
  1. String type, {
  2. List<String> deps = const [],
})

Implementation

factory DependencyConfig.singleton(String type,
    {List<String> deps = const []}) {
  return DependencyConfig(
    type: ImportableType(name: type),
    typeImpl: ImportableType(name: type),
    injectableType: InjectableType.singleton,
    dependencies: deps
        .map(
          (e) => InjectedDependency(
            type: ImportableType(name: e),
            paramName: e.toLowerCase(),
          ),
        )
        .toList(),
  );
}