removeLevel method
Implementation
void removeLevel(int level){
if(levelInfo.length == 1){
levelInfo = [
Levels(
name: 'Level1',
)
];
selectedLevel = 0;
}
else{
levelInfo.removeAt(level);
}
if(selectedLevel >= levelInfo.length){
selectedLevel = 0;
}
update();
}