pushCurrentStateToUndoStack method

void pushCurrentStateToUndoStack()

REMEMBERS CURRENT CANVAS STATE IN UNDO STACK

Implementation

void pushCurrentStateToUndoStack() {
  _latestActions.add(<Point>[...points]);
  //CLEAR ANY UNDO-ED ACTIONS. IF USER UNDO-ED ANYTHING HE ALREADY MADE
  // ANOTHER CHANGE AND LEFT THAT OLD PATH.
  _revertedActions.clear();
}