besprechung

This commit is contained in:
Nico
2025-06-03 22:31:55 +02:00
parent 07105249e2
commit 0a737f5153
22 changed files with 534 additions and 286 deletions

View File

@@ -63,7 +63,7 @@ class _StatusState extends State<BimaNutzer> {
visualDensity: const VisualDensity(vertical: -4),
title: Text(AppLocalizations.of(context)!.nneBund),
leading: Radio<String>(
value: 'NNE-Bund',
value: 'NNE Bund',
groupValue: _selectedStatus,
onChanged: (value) {
setState(() {

View File

@@ -66,6 +66,8 @@ class _HinweiseState extends State<Hinweise> {
for (String key in props.keys) {
if (!firstRun && props[key]!) {
widget.hinweise.text += ",";
} else if (firstRun && props[key]!) {
firstRun = false;
}
if (key == "sonstiges") {
widget.hinweise.text += sonstigesController.text;
@@ -73,7 +75,6 @@ class _HinweiseState extends State<Hinweise> {
widget.hinweise.text += key;
}
firstRun = false;
}
debugPrint(widget.hinweise.text);
}

View File

@@ -24,6 +24,7 @@ class HundULeineState extends State<HundULeine> {
_selectedMHundValue = "nein";
} else {
_selectedMHundValue = widget.mHund.text;
visible = true;
}
if (widget.mLeine.text == "") {

View File

@@ -3,23 +3,23 @@ import 'package:fforte/l10n/app_localizations.dart';
class SpurGefunden extends StatefulWidget {
final TextEditingController spurFund;
// final TextEditingController spurLang;
// final TextEditingController spurTiere;
// final TextEditingController spSicher;
final TextEditingController spurLang;
final TextEditingController spurTiere;
final TextEditingController spSicher;
final TextEditingController welpenSp;
// final TextEditingController welpenAnz;
// final TextEditingController wpSicher;
final TextEditingController welpenAnz;
final TextEditingController wpSicher;
const SpurGefunden(
{super.key,
required this.spurFund,
// required this.spurLang,
// required this.spurTiere,
// required this.spSicher,
required this.welpenSp,
// required this.welpenAnz,
// required this.wpSicher,
});
const SpurGefunden({
super.key,
required this.spurFund,
required this.spurLang,
required this.spurTiere,
required this.spSicher,
required this.welpenSp,
required this.welpenAnz,
required this.wpSicher,
});
@override
State<SpurGefunden> createState() => _SpurGefundenState();
@@ -27,21 +27,27 @@ class SpurGefunden extends StatefulWidget {
class _SpurGefundenState extends State<SpurGefunden> {
late bool _spurFundChecked;
// bool _spSicher = false;
// bool _wpSicher = false;
bool _spSicher = false;
bool _wpSicher = false;
late bool _welpenSpFundChecked;
@override
void initState() {
if (widget.spurFund.text == "") {
_spurFundChecked = false;
_welpenSpFundChecked = false;
} else {
_spurFundChecked = true;
_welpenSpFundChecked = true;
void initState() {
if (widget.spurFund.text == "") {
_spurFundChecked = false;
_welpenSpFundChecked = false;
} else {
_spurFundChecked = true;
_welpenSpFundChecked = true;
if (widget.wpSicher.text != "") {
_wpSicher = true;
}
if (widget.spSicher.text != "") {
_spSicher = true;
}
super.initState();
}
super.initState();
}
@override
Widget build(BuildContext context) {
@@ -59,106 +65,166 @@ class _SpurGefundenState extends State<SpurGefunden> {
});
},
),
Text(AppLocalizations.of(context)!.welpenSpurGefunden),
Checkbox(
value: _welpenSpFundChecked,
onChanged: (val) {
setState(() {
_welpenSpFundChecked = val ?? false;
widget.welpenSp.text = val ?? false ? "WelpenSp" : "";
});
},
),
// Text(AppLocalizations.of(context)!.welpenSpurGefunden),
// Checkbox(
// value: _welpenSpFundChecked,
// onChanged: (val) {
// setState(() {
// _welpenSpFundChecked = val ?? false;
// widget.welpenSp.text = val ?? false ? "WelpenSp" : "";
// });
// },
// ),
],
),
// Visibility(
// visible: _spurFundChecked,
// child: Column(
// children: [
// Align(
// alignment: Alignment.bottomLeft,
// child: Text(AppLocalizations.of(context)!.gesLaengeAllerDokSpuren)),
// TextField(
// keyboardType: TextInputType.number,
// controller: widget.spurLang,
// ),
// const SizedBox(
// height: 30,
// ),
// Align(
// alignment: Alignment.bottomLeft,
// child: Text(AppLocalizations.of(context)!.maxAnzahlZusGefaehrdeterTiere)),
// TextField(
// keyboardType: TextInputType.number,
// controller: widget.spurTiere,
// ),
// Row(
// children: [
// Text(AppLocalizations.of(context)!.sicher),
// Checkbox(
// value: _spSicher,
// onChanged: (val) {
// setState(() {
// _spSicher = val ?? false;
// widget.spSicher.text = _spSicher ? "sicher" : "unsicher";
// });
// }),
// ],
// ),
// const SizedBox(
// height: 10,
// ),
// Row(
// children: [
// Text(AppLocalizations.of(context)!.welpenSpurGefunden),
// Checkbox(
// value: _welpenSp,
// onChanged: (val) {
// setState(() {
// _welpenSp = val ?? false;
// });
// },
// ),
// ],
// ),
// Visibility(
// visible: _welpenSp,
// child: Column(
// children: [
// Align(
// alignment: Alignment.bottomLeft,
// child: Text(AppLocalizations.of(context)!.gesLaengeAllerDokSpuren)),
// TextField(
// keyboardType: TextInputType.number,
// controller: widget.welpenSp,
// ),
// const SizedBox(height: 20,),
// Align(
// alignment: Alignment.bottomLeft,
// child: Text(AppLocalizations.of(context)!.maxAnzahlZusGefaehrdeterTiere)),
// TextField(
// keyboardType: TextInputType.number,
// controller: widget.welpenAnz,
// ),
// Row(
// children: [
// Text(AppLocalizations.of(context)!.sicher),
// Checkbox(
// value: _wpSicher,
// onChanged: (val) {
// setState(() {
// _wpSicher = val ?? false;
// widget.spSicher.text =
// _spSicher ? "sicher" : "unsicher";
// });
// }),
// ],
// ),
// ],
// )),
// ],
// ),
// ),
Visibility(
visible: _spurFundChecked,
child: Column(
children: [
Row(
children: [
Expanded(
flex: 7,
child: Align(
alignment: Alignment.bottomLeft,
child: Text(
AppLocalizations.of(context)!.gesLaengeAllerDokSpuren,
),
),
),
Expanded(
flex: 2,
child: TextField(
keyboardType: TextInputType.number,
controller: widget.spurLang,
),
),
],
),
// const SizedBox(height: 10),
Row(
children: [
Expanded(
flex: 7,
child: Align(
alignment: Alignment.bottomLeft,
child: Text(
AppLocalizations.of(
context,
)!.maxAnzahlZusGefaehrdeterTiere,
),
),
),
Expanded(
flex: 2,
child: TextField(
keyboardType: TextInputType.number,
controller: widget.spurTiere,
),
),
],
),
Row(
children: [
Text(AppLocalizations.of(context)!.sicher),
Checkbox(
value: _spSicher,
onChanged: (val) {
setState(() {
_spSicher = val ?? false;
widget.spSicher.text =
_spSicher ? "sicher" : "unsicher";
});
},
),
],
),
// const SizedBox(height: 10),
Row(
children: [
Text(AppLocalizations.of(context)!.welpenSpurGefunden),
Checkbox(
value: _welpenSpFundChecked,
onChanged: (val) {
setState(() {
_welpenSpFundChecked = val ?? false;
});
},
),
],
),
Visibility(
visible: _welpenSpFundChecked,
child: Column(
children: [
Row(
children: [
Expanded(
flex: 7,
child: Align(
alignment: Alignment.bottomLeft,
child: Text(
AppLocalizations.of(
context,
)!.gesLaengeAllerDokWelpenSpuren,
),
),
),
Expanded(
flex: 2,
child: TextField(
keyboardType: TextInputType.number,
controller: widget.welpenSp,
),
),
],
),
// const SizedBox(height: 10),
Row(
children: [
Expanded(
flex: 7,
child: Align(
alignment: Alignment.bottomLeft,
child: Text(
AppLocalizations.of(
context,
)!.maxAnzahlZusGefaehrdeterTiere,
),
),
),
Expanded(
flex: 2,
child: TextField(
keyboardType: TextInputType.number,
controller: widget.welpenAnz,
),
),
],
),
Row(
children: [
Text(AppLocalizations.of(context)!.sicher),
Checkbox(
value: _wpSicher,
onChanged: (val) {
setState(() {
_wpSicher = val ?? false;
widget.spSicher.text =
_spSicher ? "sicher" : "unsicher";
});
},
),
],
),
],
),
),
],
),
),
],
);
}

View File

@@ -175,7 +175,7 @@ class _TrackingState extends State<Tracking> {
),
),
if (positionStreamRunning)
IconButton(
TextButton(
onPressed: () {
setState(() {
positionStreamRunning = false;
@@ -183,12 +183,9 @@ class _TrackingState extends State<Tracking> {
NotificationService().deleteNotification();
});
},
icon: Icon(
Icons.stop_rounded,
color: Theme.of(context).colorScheme.errorContainer,
),
child: Text(AppLocalizations.of(context)!.trackingStop),
),
IconButton(
TextButton(
onPressed: () {
if (positionStreamRunning) {
positionStreamRunning = false;
@@ -199,10 +196,10 @@ class _TrackingState extends State<Tracking> {
}
setState(() {});
},
icon:
child:
positionStreamRunning
? Icon(Icons.pause)
: Icon(Icons.play_arrow),
? Text(AppLocalizations.of(context)!.trackingPause)
: Text(AppLocalizations.of(context)!.trackingStart)
),
],
),