Skip to content

Commit

Permalink
Fix default value of board prefs
Browse files Browse the repository at this point in the history
  • Loading branch information
veloce committed Dec 19, 2024
1 parent a0e5443 commit 52dcf3e
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 9 deletions.
2 changes: 1 addition & 1 deletion lib/src/model/settings/board_preferences.dart
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ class BoardPrefs with _$BoardPrefs implements Serializable {
required ShapeColor shapeColor,
@JsonKey(defaultValue: false) required bool showBorder,
@JsonKey(defaultValue: kBoardDefaultBrightnessFilter) required double brightness,
@JsonKey(defaultValue: kBoardDefaultBrightnessFilter) required double hue,
@JsonKey(defaultValue: kBoardDefaultHueFilter) required double hue,
}) = _BoardPrefs;

static const defaults = BoardPrefs(
Expand Down
8 changes: 0 additions & 8 deletions lib/src/model/settings/general_preferences.dart
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,6 @@ class GeneralPreferences extends _$GeneralPreferences with PreferencesStorage<Ge
return save(state.copyWith(masterVolume: volume));
}

Future<void> toggleCustomTheme() async {
await save(state.copyWith(customThemeEnabled: !state.customThemeEnabled));
}

Future<void> setCustomThemeSeed(Color? color) {
return save(state.copyWith(customThemeSeed: color));
}
Expand All @@ -68,9 +64,6 @@ class GeneralPrefs with _$GeneralPrefs implements Serializable {
@JsonKey(unknownEnumValue: SoundTheme.standard) required SoundTheme soundTheme,
@JsonKey(defaultValue: 0.8) required double masterVolume,

/// Should enable custom theme
@JsonKey(defaultValue: false) required bool customThemeEnabled,

/// Custom theme seed color
@ColorConverter() Color? customThemeSeed,

Expand All @@ -89,7 +82,6 @@ class GeneralPrefs with _$GeneralPrefs implements Serializable {
isSoundEnabled: true,
soundTheme: SoundTheme.standard,
masterVolume: 0.8,
customThemeEnabled: false,
appThemeSeed: AppThemeSeed.board,
);

Expand Down

0 comments on commit 52dcf3e

Please sign in to comment.