changeColor method
Change bulb color based on partition index
Implementation
void changeColor(int index) {
if (index < _colors.length) {
_colorIndex = index;
notifyListeners();
}
}
Change bulb color based on partition index
void changeColor(int index) {
if (index < _colors.length) {
_colorIndex = index;
notifyListeners();
}
}