UndoRedoStack constructor

UndoRedoStack({
  1. required AllStrokesNotifier strokesNotifier,
  2. required CurrentStrokeValueNotifier currentStrokeNotifier,
})

Implementation

UndoRedoStack({
  required this.strokesNotifier,
  required this.currentStrokeNotifier,
}) {
  _redoStackInternal = [];
  _undoStackInternal = [];
  _strokeCount = strokesNotifier.strokesCount;

  strokesNotifier.addListener(_strokesCountListener);
  _updateCanRedo();
  _updateCanUndo();
}