addToHistory method

  1. @protected
void addToHistory()

Adds current colour to history

Implementation

@protected
void addToHistory() {
  final historyCallback = getHistoryChangedCallback();
  if (historyCallback != null &&
      !colorHistory.contains(currentHsvColor.toColor())) {
    setState(() {
      colorHistory.add(currentHsvColor.toColor());
    });
    historyCallback(colorHistory);
  }
}