transformHistoryValue method

  1. @override
  2. @protected
ScribbleState transformHistoryValue(
  1. ScribbleState historyValue,
  2. ScribbleState currentState
)

Only apply the sketch from the undo history, otherwise keep current state

Implementation

@override
@protected
ScribbleState transformHistoryValue(
  ScribbleState historyValue,
  ScribbleState currentState,
) {
  return currentState.copyWith(
    sketch: historyValue.sketch,
  );
}