From ac1851d501666dc2317e4894e21b49639c332836 Mon Sep 17 00:00:00 2001 From: Felix Kirchner Date: Sat, 19 Jul 2025 22:53:13 +0200 Subject: [PATCH] Deleted getter --- lib/services/config_service.dart | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/lib/services/config_service.dart b/lib/services/config_service.dart index 108b210..a360fe4 100644 --- a/lib/services/config_service.dart +++ b/lib/services/config_service.dart @@ -37,12 +37,6 @@ class ConfigService { gameMode = newGameMode; } - /// Getter for the point limit. - static Future getPointLimit() async { - final prefs = await SharedPreferences.getInstance(); - return prefs.getInt(_keyPointLimit) ?? _defaultPointLimit; - } - /// Setter for the point limit. /// [newPointLimit] is the new point limit to be set. static Future setPointLimit(int newPointLimit) async { @@ -51,12 +45,6 @@ class ConfigService { pointLimit = newPointLimit; } - /// Getter for the cabo penalty. - static Future getCaboPenalty() async { - final prefs = await SharedPreferences.getInstance(); - return prefs.getInt(_keyCaboPenalty) ?? _defaultCaboPenalty; - } - /// Setter for the cabo penalty. /// [newCaboPenalty] is the new cabo penalty to be set. static Future setCaboPenalty(int newCaboPenalty) async { @@ -69,6 +57,7 @@ class ConfigService { static Future resetConfig() async { ConfigService.pointLimit = _defaultPointLimit; ConfigService.caboPenalty = _defaultCaboPenalty; + ConfigService.gameMode = _defaultGameMode; final prefs = await SharedPreferences.getInstance(); await prefs.setInt(_keyPointLimit, _defaultPointLimit); await prefs.setInt(_keyCaboPenalty, _defaultCaboPenalty);