UndoRedoStack constructor
UndoRedoStack({
- required AllStrokesNotifier strokesNotifier,
- required CurrentStrokeValueNotifier currentStrokeNotifier,
Implementation
UndoRedoStack({
required this.strokesNotifier,
required this.currentStrokeNotifier,
}) {
_redoStackInternal = [];
_undoStackInternal = [];
_strokeCount = strokesNotifier.strokesCount;
strokesNotifier.addListener(_strokesCountListener);
_updateCanRedo();
_updateCanUndo();
}