removeLayer method

void removeLayer(
  1. int layer
)

Implementation

void removeLayer(int layer){
  if(layer == selectedTileLayer){
    selectedTileLayer = 0;
  }
  if(tileLayer.length == 1){
    tileLayer[0] = TileLayers(length: currentGridLength);
  }
  else{
    tileLayer.removeAt(layer);
  }
}