isChildOf<T extends Parentable<T> > function
Implementation
bool isChildOf<T extends Parentable<T>>(T child, Iterable<T> parents) {
for (T? parent = child; parent != null; parent = parent.parent) {
if (parents.contains(parent)) {
return true;
}
}
return false;
}