nodeTreeContainsAny function
Returns true
if rootNode
contains any Node in list
.
Implementation
bool nodeTreeContainsAny(Node rootNode, Iterable<Node> list) {
if (list.isEmpty) return false;
return list.firstWhereOrNull((e) => e == rootNode || rootNode.contains(e)) !=
null;
}