fixed hinweise values

This commit is contained in:
Nico
2025-05-27 22:45:58 +02:00
parent 817b087ce3
commit 6980dfc4de
2 changed files with 8 additions and 7 deletions

View File

@@ -263,7 +263,6 @@ class _ExcursionMainState extends State<ExcursionMain> {
// ---------- Bima number
const Divider(),
const SizedBox(height: 10),
ClipRRect(
borderRadius: BorderRadius.all(Radius.circular(10)),
child: ExpansionPanelList(

View File

@@ -48,17 +48,18 @@ class _HinweiseState extends State<Hinweise> {
widget.hinweise.text = "";
for (String key in props.keys) {
if (!firstRun) {
widget.hinweise.text += ";";
if (!firstRun && props[key]!) {
widget.hinweise.text += ",";
}
if (key == "sonstiges") {
widget.hinweise.text += "$key:${sonstigesController.text}";
} else {
widget.hinweise.text += "$key:${props[key]}";
widget.hinweise.text += sonstigesController.text;
} else if (props[key]!){
widget.hinweise.text += key;
}
firstRun = false;
}
debugPrint(widget.hinweise.text);
}
@override
@@ -97,7 +98,8 @@ class _HinweiseState extends State<Hinweise> {
title: Text(AppLocalizations.of(context)!.sonstiges),
value: sonstigesChecked,
onChanged: (bool? value) {
setState(() => sonstigesChecked = value ?? false);
if (!value!) sonstigesController.text = "";
setState(() => sonstigesChecked = value);
updateController();
}),
if (sonstigesChecked)