handleColorChanged method

void handleColorChanged(
  1. int newColor
)

Handles the color change event.

This method calls the onColorChanged callback with the provided newColor and then calls handleUpdateUI.

Implementation

void handleColorChanged(int newColor) {
  onColorChanged?.call(newColor);
  handleUpdateUI();
}