CNode? findLastNode(CNode parent) { if (parent.children == null || parent.children!.isEmpty) { return null; } return parent.children![parent.children!.length - 1]; }