findCompWhere<C extends Comp<T> > method
Recursively finds the first component of type C satisfying predicate.
Implementation
C? findCompWhere<C extends Comp<T>>(bool Function(C) predicate) {
for (final comp in getAll<C>()) {
if (predicate(comp)) return comp;
}
for (final comp in _components) {
final found = comp.findCompWhere<C>(predicate);
if (found != null) return found;
}
return null;
}