disposeScope static method
Disposes all instances within the given scope
.
Implementation
static void disposeScope(String scope) {
final types = _scopedInstances[scope];
if (types != null) {
for (var type in types) {
final instance = _instances.remove(type);
if (instance is Injectable) {
instance.onDispose();
}
_notify('disposeScope', type);
}
_scopedInstances.remove(scope);
}
}