From 21462ace9bb4b4c51b1296496480ace1ce54d8ce Mon Sep 17 00:00:00 2001 From: Vincent Velociter Date: Sat, 23 Nov 2024 13:43:37 +0100 Subject: [PATCH] Add board prefs missing value fallback --- lib/src/model/settings/board_preferences.dart | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/lib/src/model/settings/board_preferences.dart b/lib/src/model/settings/board_preferences.dart index 43c741ef93..f95bf51d93 100644 --- a/lib/src/model/settings/board_preferences.dart +++ b/lib/src/model/settings/board_preferences.dart @@ -121,6 +121,10 @@ class BoardPrefs with _$BoardPrefs implements Serializable { required bool coordinates, required bool pieceAnimation, required bool showMaterialDifference, + @JsonKey( + defaultValue: ClockPosition.right, + unknownEnumValue: ClockPosition.right, + ) required ClockPosition clockPosition, @JsonKey( defaultValue: PieceShiftMethod.either, @@ -131,7 +135,10 @@ class BoardPrefs with _$BoardPrefs implements Serializable { /// Whether to enable shape drawings on the board for games and puzzles. @JsonKey(defaultValue: true) required bool enableShapeDrawings, @JsonKey(defaultValue: true) required bool magnifyDraggedPiece, - @JsonKey(defaultValue: DragTargetKind.circle) + @JsonKey( + defaultValue: DragTargetKind.circle, + unknownEnumValue: DragTargetKind.circle, + ) required DragTargetKind dragTargetKind, @JsonKey( defaultValue: ShapeColor.green,