Deleted getter
This commit is contained in:
@@ -37,12 +37,6 @@ class ConfigService {
|
|||||||
gameMode = newGameMode;
|
gameMode = newGameMode;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Getter for the point limit.
|
|
||||||
static Future<int> getPointLimit() async {
|
|
||||||
final prefs = await SharedPreferences.getInstance();
|
|
||||||
return prefs.getInt(_keyPointLimit) ?? _defaultPointLimit;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Setter for the point limit.
|
/// Setter for the point limit.
|
||||||
/// [newPointLimit] is the new point limit to be set.
|
/// [newPointLimit] is the new point limit to be set.
|
||||||
static Future<void> setPointLimit(int newPointLimit) async {
|
static Future<void> setPointLimit(int newPointLimit) async {
|
||||||
@@ -51,12 +45,6 @@ class ConfigService {
|
|||||||
pointLimit = newPointLimit;
|
pointLimit = newPointLimit;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Getter for the cabo penalty.
|
|
||||||
static Future<int> getCaboPenalty() async {
|
|
||||||
final prefs = await SharedPreferences.getInstance();
|
|
||||||
return prefs.getInt(_keyCaboPenalty) ?? _defaultCaboPenalty;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Setter for the cabo penalty.
|
/// Setter for the cabo penalty.
|
||||||
/// [newCaboPenalty] is the new cabo penalty to be set.
|
/// [newCaboPenalty] is the new cabo penalty to be set.
|
||||||
static Future<void> setCaboPenalty(int newCaboPenalty) async {
|
static Future<void> setCaboPenalty(int newCaboPenalty) async {
|
||||||
@@ -69,6 +57,7 @@ class ConfigService {
|
|||||||
static Future<void> resetConfig() async {
|
static Future<void> resetConfig() async {
|
||||||
ConfigService.pointLimit = _defaultPointLimit;
|
ConfigService.pointLimit = _defaultPointLimit;
|
||||||
ConfigService.caboPenalty = _defaultCaboPenalty;
|
ConfigService.caboPenalty = _defaultCaboPenalty;
|
||||||
|
ConfigService.gameMode = _defaultGameMode;
|
||||||
final prefs = await SharedPreferences.getInstance();
|
final prefs = await SharedPreferences.getInstance();
|
||||||
await prefs.setInt(_keyPointLimit, _defaultPointLimit);
|
await prefs.setInt(_keyPointLimit, _defaultPointLimit);
|
||||||
await prefs.setInt(_keyCaboPenalty, _defaultCaboPenalty);
|
await prefs.setInt(_keyCaboPenalty, _defaultCaboPenalty);
|
||||||
|
|||||||
Reference in New Issue
Block a user