getNodeParentsUntilRoot method
Implementation
List<T> getNodeParentsUntilRoot(T? node) {
var list = <T>[];
while (true) {
var parent = getNodeParent(node);
if (parent == null) break;
list.add(parent);
node = parent;
}
return list;
}