allSelectedList method

List<SelectionEntity> allSelectedList()

获取当前节点的所有选中的子节点

Implementation

List<SelectionEntity> allSelectedList() {
  List<SelectionEntity> results = [];
  List<SelectionEntity> firstColumn =
      SelectionUtil.currentSelectListForEntity(this);
  results.addAll(firstColumn);
  if (firstColumn.isNotEmpty) {
    for (SelectionEntity firstEntity in firstColumn) {
      List<SelectionEntity> secondColumn =
          SelectionUtil.currentSelectListForEntity(firstEntity);
      results.addAll(secondColumn);
      if (secondColumn.isNotEmpty) {
        for (SelectionEntity secondEntity in secondColumn) {
          List<SelectionEntity> thirdColumn =
              SelectionUtil.currentSelectListForEntity(secondEntity);
          results.addAll(thirdColumn);
        }
      }
    }
  }
  return results;
}