isDescendant method
Returns true if id is ancestorId or one of its descendants.
Implementation
bool isDescendant(String id, String ancestorId) {
var current = id as String?;
while (current != null) {
if (current == ancestorId) return true;
current = _parents[current];
}
return false;
}