injectScoped<T> function
dynamic
injectScoped<
T>( - T builder(), {
- required String scope,
- String? tag,
})
Implementation
injectScoped<T>(T Function() builder, {required String scope, String? tag}) {
final list = _scopedInjectors.putIfAbsent(scope, () => []);
var plexDependency = _PlexInjector<T>.singletonLazy((parm) => builder(), tag);
if (_isInjectedScoped<T>(list, tag: tag)) {
throw Exception("This type of object is already registered in scope '$scope'. If you want to register other dependency with same object Please mark it with 'Tag'");
}
list.add(plexDependency);
}