allInstancesWhere static method
All active subsystem instances across every registered SubsystemTypeDesc
matching predicate — not scoped to a single type.
Implementation
static List<Subsystem> allInstancesWhere(bool Function(Subsystem instance) predicate) {
final instances = <Subsystem>[];
for (final registry in _registriesByTypeDesc.values) {
for (final singleton in registry.allInstances) {
if (predicate(singleton)) {
instances.add(singleton);
}
}
}
return instances;
}