getSelected<T extends TreeData> static method
Implementation
static List<TreeVO<T>> getSelected<T extends TreeData>(List<TreeVO<T>> data) {
var selected = <TreeVO<T>>[];
data.forEach((element) {
if (element.checked!) {
selected.add(element);
}
if (element.children.length > 0) {
selected.addAll(getSelected(element.children));
}
});
return selected;
}