removeEmptyNodes method
void
removeEmptyNodes()
Implementation
void removeEmptyNodes(){
for (int i = children.length - 1; i >= 0; i--) {
children[i].removeEmptyNodes();
if (children[i].children.isNotEmpty && children[i].data.isNotEmpty) {
children.removeAt(i);
}
}
}