changed suffixWidget assignment and moved stepperKeys

This commit is contained in:
2025-07-09 18:51:34 +02:00
parent 42e51a092b
commit 74a27aea24
3 changed files with 4 additions and 4 deletions

View File

@@ -51,10 +51,10 @@ class _SettingsViewState extends State<SettingsView> {
margin: EdgeInsets.zero,
children: [
CustomFormRow(
key: _stepperKey1,
prefixText: 'Cabo-Strafe',
prefixIcon: CupertinoIcons.minus_square,
suffixWidget: Stepper(
key: _stepperKey1,
initialValue: ConfigService.caboPenalty,
minValue: 0,
maxValue: 50,
@@ -68,10 +68,10 @@ class _SettingsViewState extends State<SettingsView> {
),
),
CustomFormRow(
key: _stepperKey2,
prefixText: 'Punkte-Limit',
prefixIcon: FontAwesomeIcons.bullseye,
suffixWidget: Stepper(
key: _stepperKey2,
initialValue: ConfigService.pointLimit,
minValue: 30,
maxValue: 1000,

View File

@@ -24,11 +24,11 @@ class _CustomFormRowState extends State<CustomFormRow> {
@override
void initState() {
super.initState();
suffixWidget = widget.suffixWidget ?? const SizedBox.shrink();
}
@override
Widget build(BuildContext context) {
suffixWidget = widget.suffixWidget ?? const SizedBox.shrink();
return CupertinoButton(
padding: EdgeInsets.zero,
onPressed: widget.onPressed,