void clear(List<TreeData> treeDataList) { treeDataList.forEach((element) { element.selected = false; if(element.children != null) { clear(element.children!); } }); }