addLayer method
Implementation
void addLayer(Layer layer) {
if (layers[currentIndex] != null) {
layers[currentIndex]?.add(layer);
} else {
layers.addAll({
currentIndex: [layer]
});
}
}
void addLayer(Layer layer) {
if (layers[currentIndex] != null) {
layers[currentIndex]?.add(layer);
} else {
layers.addAll({
currentIndex: [layer]
});
}
}