setCurrentColor method

void setCurrentColor(
  1. Color color
)

Sets the selected brush's colour.

Implementation

void setCurrentColor(Color color) {
  if (brushColors[currentBrush] == color) return;
  brushColors[currentBrush] = color;
  notifyListeners();
}