toTreeVOList<T extends TreeData> static method

List<TreeVO<T>> toTreeVOList<T extends TreeData>(
  1. List<T> data
)

Implementation

static List<TreeVO<T>> toTreeVOList<T extends TreeData>(List<T> data) {
  List<TreeVO<T>> result = [];
  data.forEach((element) {
    addTreeData(result, element);
  });
  return result.where((element) => element.data!.pid == null).toList();
}