fixed hinweise values
This commit is contained in:
@@ -263,7 +263,6 @@ class _ExcursionMainState extends State<ExcursionMain> {
|
|||||||
// ---------- Bima number
|
// ---------- Bima number
|
||||||
const Divider(),
|
const Divider(),
|
||||||
const SizedBox(height: 10),
|
const SizedBox(height: 10),
|
||||||
|
|
||||||
ClipRRect(
|
ClipRRect(
|
||||||
borderRadius: BorderRadius.all(Radius.circular(10)),
|
borderRadius: BorderRadius.all(Radius.circular(10)),
|
||||||
child: ExpansionPanelList(
|
child: ExpansionPanelList(
|
||||||
|
|||||||
@@ -48,17 +48,18 @@ class _HinweiseState extends State<Hinweise> {
|
|||||||
widget.hinweise.text = "";
|
widget.hinweise.text = "";
|
||||||
|
|
||||||
for (String key in props.keys) {
|
for (String key in props.keys) {
|
||||||
if (!firstRun) {
|
if (!firstRun && props[key]!) {
|
||||||
widget.hinweise.text += ";";
|
widget.hinweise.text += ",";
|
||||||
}
|
}
|
||||||
if (key == "sonstiges") {
|
if (key == "sonstiges") {
|
||||||
widget.hinweise.text += "$key:${sonstigesController.text}";
|
widget.hinweise.text += sonstigesController.text;
|
||||||
} else {
|
} else if (props[key]!){
|
||||||
widget.hinweise.text += "$key:${props[key]}";
|
widget.hinweise.text += key;
|
||||||
}
|
}
|
||||||
|
|
||||||
firstRun = false;
|
firstRun = false;
|
||||||
}
|
}
|
||||||
|
debugPrint(widget.hinweise.text);
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
@@ -97,7 +98,8 @@ class _HinweiseState extends State<Hinweise> {
|
|||||||
title: Text(AppLocalizations.of(context)!.sonstiges),
|
title: Text(AppLocalizations.of(context)!.sonstiges),
|
||||||
value: sonstigesChecked,
|
value: sonstigesChecked,
|
||||||
onChanged: (bool? value) {
|
onChanged: (bool? value) {
|
||||||
setState(() => sonstigesChecked = value ?? false);
|
if (!value!) sonstigesController.text = "";
|
||||||
|
setState(() => sonstigesChecked = value);
|
||||||
updateController();
|
updateController();
|
||||||
}),
|
}),
|
||||||
if (sonstigesChecked)
|
if (sonstigesChecked)
|
||||||
|
|||||||
Reference in New Issue
Block a user