Moved config values to ConfigService

This commit is contained in:
2025-07-07 23:14:11 +02:00
parent a13a3ac0c9
commit ace157dc47
6 changed files with 21 additions and 21 deletions

View File

@@ -52,14 +52,14 @@ class _SettingsViewState extends State<SettingsView> {
AppLocalizations.of(context).cabo_penalty_subtitle),
trailing: Stepper(
key: _stepperKey1,
initialValue: Globals.caboPenalty,
initialValue: ConfigService.caboPenalty,
minValue: 0,
maxValue: 50,
step: 1,
onChanged: (newCaboPenalty) {
setState(() {
ConfigService.setCaboPenalty(newCaboPenalty);
Globals.caboPenalty = newCaboPenalty;
ConfigService.caboPenalty = newCaboPenalty;
});
},
),
@@ -73,14 +73,14 @@ class _SettingsViewState extends State<SettingsView> {
Text(AppLocalizations.of(context).point_limit_subtitle),
trailing: Stepper(
key: _stepperKey2,
initialValue: Globals.pointLimit,
initialValue: ConfigService.pointLimit,
minValue: 30,
maxValue: 1000,
step: 10,
onChanged: (newPointLimit) {
setState(() {
ConfigService.setPointLimit(newPointLimit);
Globals.pointLimit = newPointLimit;
ConfigService.pointLimit = newPointLimit;
});
},
),