remove unused code
This commit is contained in:
parent
e93f62b455
commit
dc19874ee7
|
@ -22,7 +22,6 @@ import 'dart:io';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:hive_flutter/hive_flutter.dart' show Box;
|
import 'package:hive_flutter/hive_flutter.dart' show Box;
|
||||||
import 'package:sanmill/generated/l10n.dart';
|
import 'package:sanmill/generated/l10n.dart';
|
||||||
import 'package:sanmill/models/display.dart';
|
|
||||||
import 'package:sanmill/models/preferences.dart';
|
import 'package:sanmill/models/preferences.dart';
|
||||||
import 'package:sanmill/models/temporary.dart';
|
import 'package:sanmill/models/temporary.dart';
|
||||||
import 'package:sanmill/screens/env_page.dart';
|
import 'package:sanmill/screens/env_page.dart';
|
||||||
|
@ -111,20 +110,6 @@ class GameSettingsPage extends StatelessWidget {
|
||||||
debugPrint("$_tag isAutoRestart: $value");
|
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) {
|
void _setShufflingEnabled(Preferences _preferences, bool value) {
|
||||||
LocalDatabaseService.preferences =
|
LocalDatabaseService.preferences =
|
||||||
_preferences.copyWith(shufflingEnabled: value);
|
_preferences.copyWith(shufflingEnabled: value);
|
||||||
|
@ -132,20 +117,6 @@ class GameSettingsPage extends StatelessWidget {
|
||||||
debugPrint("$_tag shufflingEnabled: $value");
|
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) {
|
void _setTone(Preferences _preferences, bool value) {
|
||||||
LocalDatabaseService.preferences =
|
LocalDatabaseService.preferences =
|
||||||
_preferences.copyWith(toneEnabled: value);
|
_preferences.copyWith(toneEnabled: value);
|
||||||
|
@ -181,40 +152,6 @@ class GameSettingsPage extends StatelessWidget {
|
||||||
debugPrint("$_tag experimentsEnabled: $value");
|
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<Preferences> prefBox, _) {
|
Column _buildPrefs(BuildContext context, Box<Preferences> prefBox, _) {
|
||||||
final Preferences _preferences = prefBox.get(
|
final Preferences _preferences = prefBox.get(
|
||||||
LocalDatabaseService.preferencesKey,
|
LocalDatabaseService.preferencesKey,
|
||||||
|
|
|
@ -193,12 +193,7 @@ class RuleSettingsPage extends StatelessWidget {
|
||||||
debugPrint("[config] mayRemoveMultiple: $value");
|
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<Rules> rulesBox, _) {
|
Widget _buildRules(BuildContext context, Box<Rules> rulesBox, _) {
|
||||||
final Rules _rules = rulesBox.get(
|
final Rules _rules = rulesBox.get(
|
||||||
|
|
|
@ -16,7 +16,6 @@
|
||||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import 'package:flutter/material.dart';
|
|
||||||
import 'package:sanmill/mill/position.dart';
|
import 'package:sanmill/mill/position.dart';
|
||||||
|
|
||||||
enum EngineType {
|
enum EngineType {
|
||||||
|
|
Loading…
Reference in New Issue