diff --git a/src/ui/flutter_app/lib/screens/game_settings/game_settings_page.dart b/src/ui/flutter_app/lib/screens/game_settings/game_settings_page.dart index 63fb53be..767990e2 100644 --- a/src/ui/flutter_app/lib/screens/game_settings/game_settings_page.dart +++ b/src/ui/flutter_app/lib/screens/game_settings/game_settings_page.dart @@ -22,7 +22,6 @@ import 'dart:io'; import 'package:flutter/material.dart'; import 'package:hive_flutter/hive_flutter.dart' show Box; import 'package:sanmill/generated/l10n.dart'; -import 'package:sanmill/models/display.dart'; import 'package:sanmill/models/preferences.dart'; import 'package:sanmill/models/temporary.dart'; import 'package:sanmill/screens/env_page.dart'; @@ -111,20 +110,6 @@ class GameSettingsPage extends StatelessWidget { debugPrint("$_tag isAutoRestart: $value"); } - void _setIsAutoChangeFirstMove(Preferences _preferences, bool value) { - LocalDatabaseService.preferences = - _preferences.copyWith(isAutoChangeFirstMove: value); - - debugPrint("$_tag isAutoChangeFirstMove: $value"); - } - - void _setResignIfMostLose(Preferences _preferences, bool value) { - LocalDatabaseService.preferences = - _preferences.copyWith(resignIfMostLose: value); - - debugPrint("$_tag resignIfMostLose: $value"); - } - void _setShufflingEnabled(Preferences _preferences, bool value) { LocalDatabaseService.preferences = _preferences.copyWith(shufflingEnabled: value); @@ -132,20 +117,6 @@ class GameSettingsPage extends StatelessWidget { debugPrint("$_tag shufflingEnabled: $value"); } - void _setLearnEndgame(Preferences _preferences, bool value) { - LocalDatabaseService.preferences = - _preferences.copyWith(learnEndgame: value); - - debugPrint("$_tag learnEndgame: $value"); - } - - void _setOpeningBook(Preferences _preferences, bool value) { - LocalDatabaseService.preferences = - _preferences.copyWith(openingBook: value); - - debugPrint("$_tag openingBook: $value"); - } - void _setTone(Preferences _preferences, bool value) { LocalDatabaseService.preferences = _preferences.copyWith(toneEnabled: value); @@ -181,40 +152,6 @@ class GameSettingsPage extends StatelessWidget { debugPrint("$_tag experimentsEnabled: $value"); } - // Display - void _setLanguage(Display _display, Locale value) { - LocalDatabaseService.display = _display.copyWith(languageCode: value); - - debugPrint("$_tag languageCode: $value"); - } - - void _setIsPieceCountInHandShown(Display _display, bool value) { - LocalDatabaseService.display = - _display.copyWith(isPieceCountInHandShown: value); - - debugPrint("$_tag isPieceCountInHandShown: $value"); - } - - void _setIsNotationsShown(Display _display, bool value) { - LocalDatabaseService.display = _display.copyWith(isNotationsShown: value); - - debugPrint("$_tag isNotationsShown: $value"); - } - - void _setIsHistoryNavigationToolbarShown(Display _display, bool value) { - LocalDatabaseService.display = - _display.copyWith(isHistoryNavigationToolbarShown: value); - - debugPrint("$_tag isHistoryNavigationToolbarShown: $value"); - } - - void _setStandardNotationEnabled(Display _display, bool value) { - LocalDatabaseService.display = - _display.copyWith(standardNotationEnabled: value); - - debugPrint("$_tag standardNotationEnabled: $value"); - } - Column _buildPrefs(BuildContext context, Box prefBox, _) { final Preferences _preferences = prefBox.get( LocalDatabaseService.preferencesKey, diff --git a/src/ui/flutter_app/lib/screens/rule_settings/rule_settings_page.dart b/src/ui/flutter_app/lib/screens/rule_settings/rule_settings_page.dart index e6ab1f77..50c17de6 100644 --- a/src/ui/flutter_app/lib/screens/rule_settings/rule_settings_page.dart +++ b/src/ui/flutter_app/lib/screens/rule_settings/rule_settings_page.dart @@ -193,12 +193,7 @@ class RuleSettingsPage extends StatelessWidget { debugPrint("[config] mayRemoveMultiple: $value"); } - // Unused - void _setNPiecesAtLeast(Rules _rules, int value) { - LocalDatabaseService.rules = _rules.copyWith(piecesAtLeastCount: value); - debugPrint("[config] piecesAtLeastCount: $value"); - } Widget _buildRules(BuildContext context, Box rulesBox, _) { final Rules _rules = rulesBox.get( diff --git a/src/ui/flutter_app/lib/services/engine/engine.dart b/src/ui/flutter_app/lib/services/engine/engine.dart index 12c36589..9ff62fb1 100644 --- a/src/ui/flutter_app/lib/services/engine/engine.dart +++ b/src/ui/flutter_app/lib/services/engine/engine.dart @@ -16,7 +16,6 @@ along with this program. If not, see . */ -import 'package:flutter/material.dart'; import 'package:sanmill/mill/position.dart'; enum EngineType {