made spur gefunden like in email described

This commit is contained in:
Nico
2025-05-29 15:19:13 +02:00
parent f9b8a14c6d
commit 619c0b83a3
2 changed files with 116 additions and 105 deletions

View File

@@ -384,12 +384,12 @@ class _ExcursionMainState extends State<ExcursionMain> {
// ---------- Track found // ---------- Track found
SpurGefunden( SpurGefunden(
spurFund: rmap["SpurFund"]!["controller"]!, spurFund: rmap["SpurFund"]!["controller"]!,
spurLang: rmap["SpurLang"]!["controller"]!, // spurLang: rmap["SpurLang"]!["controller"]!,
spurTiere: rmap["SpurTiere"]!["controller"]!, // spurTiere: rmap["SpurTiere"]!["controller"]!,
spSicher: rmap["SpSicher"]!["controller"]!, // spSicher: rmap["SpSicher"]!["controller"]!,
welpenSp: rmap["WelpenSp"]!["controller"]!, welpenSp: rmap["WelpenSp"]!["controller"]!,
welpenAnz: rmap["WelpenAnz"]!["controller"]!, // welpenAnz: rmap["WelpenAnz"]!["controller"]!,
wpSicher: rmap["WpSicher"]!["controller"]!, // wpSicher: rmap["WpSicher"]!["controller"]!,
), ),
const SizedBox(height: 20), const SizedBox(height: 20),
// ---------- Counts // ---------- Counts

View File

@@ -3,22 +3,23 @@ import 'package:fforte/l10n/app_localizations.dart';
class SpurGefunden extends StatefulWidget { class SpurGefunden extends StatefulWidget {
final TextEditingController spurFund; final TextEditingController spurFund;
final TextEditingController spurLang; // final TextEditingController spurLang;
final TextEditingController spurTiere; // final TextEditingController spurTiere;
final TextEditingController spSicher; // final TextEditingController spSicher;
final TextEditingController welpenSp; final TextEditingController welpenSp;
final TextEditingController welpenAnz; // final TextEditingController welpenAnz;
final TextEditingController wpSicher; // final TextEditingController wpSicher;
const SpurGefunden( const SpurGefunden(
{super.key, {super.key,
required this.spurFund, required this.spurFund,
required this.spurLang, // required this.spurLang,
required this.spurTiere, // required this.spurTiere,
required this.spSicher, // required this.spSicher,
required this.welpenSp, required this.welpenSp,
required this.welpenAnz, // required this.welpenAnz,
required this.wpSicher}); // required this.wpSicher,
});
@override @override
State<SpurGefunden> createState() => _SpurGefundenState(); State<SpurGefunden> createState() => _SpurGefundenState();
@@ -26,8 +27,8 @@ class SpurGefunden extends StatefulWidget {
class _SpurGefundenState extends State<SpurGefunden> { class _SpurGefundenState extends State<SpurGefunden> {
bool _spurFundChecked = false; bool _spurFundChecked = false;
bool _spSicher = false; // bool _spSicher = false;
bool _wpSicher = false; // bool _wpSicher = false;
bool _welpenSp = false; bool _welpenSp = false;
@override @override
@@ -46,96 +47,106 @@ class _SpurGefundenState extends State<SpurGefunden> {
}); });
}, },
), ),
Text(AppLocalizations.of(context)!.welpenSpurGefunden),
Checkbox(
value: _welpenSp,
onChanged: (val) {
setState(() {
_welpenSp = val ?? false;
widget.welpenSp.text = val ?? false ? "WelpenSp" : "";
});
},
),
], ],
), ),
Visibility( // Visibility(
visible: _spurFundChecked, // visible: _spurFundChecked,
child: Column( // child: Column(
children: [ // children: [
Align( // Align(
alignment: Alignment.bottomLeft, // alignment: Alignment.bottomLeft,
child: Text(AppLocalizations.of(context)!.gesLaengeAllerDokSpuren)), // child: Text(AppLocalizations.of(context)!.gesLaengeAllerDokSpuren)),
TextField( // TextField(
keyboardType: TextInputType.number, // keyboardType: TextInputType.number,
controller: widget.spurLang, // controller: widget.spurLang,
), // ),
const SizedBox( // const SizedBox(
height: 30, // height: 30,
), // ),
Align( // Align(
alignment: Alignment.bottomLeft, // alignment: Alignment.bottomLeft,
child: Text(AppLocalizations.of(context)!.maxAnzahlZusGefaehrdeterTiere)), // child: Text(AppLocalizations.of(context)!.maxAnzahlZusGefaehrdeterTiere)),
TextField( // TextField(
keyboardType: TextInputType.number, // keyboardType: TextInputType.number,
controller: widget.spurTiere, // controller: widget.spurTiere,
), // ),
Row( // Row(
children: [ // children: [
Text(AppLocalizations.of(context)!.sicher), // Text(AppLocalizations.of(context)!.sicher),
Checkbox( // Checkbox(
value: _spSicher, // value: _spSicher,
onChanged: (val) { // onChanged: (val) {
setState(() { // setState(() {
_spSicher = val ?? false; // _spSicher = val ?? false;
widget.spSicher.text = _spSicher ? "sicher" : "unsicher"; // widget.spSicher.text = _spSicher ? "sicher" : "unsicher";
}); // });
}), // }),
], // ],
), // ),
const SizedBox( // const SizedBox(
height: 10, // height: 10,
), // ),
Row( // Row(
children: [ // children: [
Text(AppLocalizations.of(context)!.welpenSpurGefunden), // Text(AppLocalizations.of(context)!.welpenSpurGefunden),
Checkbox( // Checkbox(
value: _welpenSp, // value: _welpenSp,
onChanged: (val) { // onChanged: (val) {
setState(() { // setState(() {
_welpenSp = val ?? false; // _welpenSp = val ?? false;
}); // });
}, // },
), // ),
], // ],
), // ),
Visibility( // Visibility(
visible: _welpenSp, // visible: _welpenSp,
child: Column( // child: Column(
children: [ // children: [
Align( // Align(
alignment: Alignment.bottomLeft, // alignment: Alignment.bottomLeft,
child: Text(AppLocalizations.of(context)!.gesLaengeAllerDokSpuren)), // child: Text(AppLocalizations.of(context)!.gesLaengeAllerDokSpuren)),
TextField( // TextField(
keyboardType: TextInputType.number, // keyboardType: TextInputType.number,
controller: widget.welpenSp, // controller: widget.welpenSp,
), // ),
const SizedBox(height: 20,), // const SizedBox(height: 20,),
Align( // Align(
alignment: Alignment.bottomLeft, // alignment: Alignment.bottomLeft,
child: Text(AppLocalizations.of(context)!.maxAnzahlZusGefaehrdeterTiere)), // child: Text(AppLocalizations.of(context)!.maxAnzahlZusGefaehrdeterTiere)),
TextField( // TextField(
keyboardType: TextInputType.number, // keyboardType: TextInputType.number,
controller: widget.welpenAnz, // controller: widget.welpenAnz,
), // ),
Row( // Row(
children: [ // children: [
Text(AppLocalizations.of(context)!.sicher), // Text(AppLocalizations.of(context)!.sicher),
Checkbox( // Checkbox(
value: _wpSicher, // value: _wpSicher,
onChanged: (val) { // onChanged: (val) {
setState(() { // setState(() {
_wpSicher = val ?? false; // _wpSicher = val ?? false;
widget.spSicher.text = // widget.spSicher.text =
_spSicher ? "sicher" : "unsicher"; // _spSicher ? "sicher" : "unsicher";
}); // });
}), // }),
], // ],
), // ),
], // ],
)), // )),
], // ],
), // ),
), // ),
], ],
); );
} }