clearHistory method

void clearHistory()

Clear all history and reset to current value.

Implementation

void clearHistory() {
  _history.clear();
  _history.add(value);
  _index = 0;
}