unplantTree static method

void unplantTree(
  1. LogTree tree
)

Un-plants a tree from

Implementation

static void unplantTree(LogTree tree) {
  if (tree is CloseableTree) {
    (tree as CloseableTree).close();
  }
  _trees.forEach((level, levelTrees) {
    levelTrees.remove(tree);
    if (tree is UnPlantableTree) {
      (tree as UnPlantableTree).unplanted();
    }
  });
}