begin cleanup of view_cams and begin of making it usable with exursion and place
time refactoring refactoring again
This commit is contained in:
@@ -7,7 +7,7 @@ import 'package:fforte/screens/excursion/widgets/hund_u_leine.dart';
|
||||
import 'package:fforte/screens/excursion/widgets/letzter_niederschlag.dart';
|
||||
import 'package:fforte/screens/excursion/widgets/spur_gefunden.dart';
|
||||
import 'package:fforte/screens/excursion/widgets/strecke_u_spurbedingungen.dart';
|
||||
import 'package:fforte/screens/helper/dialog_helper.dart';
|
||||
import 'package:fforte/screens/helper/add_entries_dialog_helper.dart';
|
||||
import 'package:fforte/screens/sharedMethods/check_required.dart';
|
||||
import 'package:fforte/screens/sharedWidgets/datum.dart';
|
||||
import 'package:fforte/screens/sharedWidgets/var_text_field.dart';
|
||||
@@ -24,65 +24,65 @@ class ExcursionMain extends StatefulWidget {
|
||||
class _ExcursionMainState extends State<ExcursionMain> {
|
||||
// all TextEditingController because its easier
|
||||
|
||||
Map<String, Map<String, dynamic>> rmap = {
|
||||
// Step 1
|
||||
"LogDat": { "controller": TextEditingController(), "required": bool, },
|
||||
"Rudel": { "controller": TextEditingController(), "required": bool, },
|
||||
"Teilnehm": { "controller": TextEditingController(), "required": bool, },
|
||||
"Jahr": { "controller": TextEditingController(), "required": bool, },
|
||||
"Dauer": { "controller": TextEditingController(), "required": bool, },
|
||||
"MHund": { "controller": TextEditingController(), "required": bool, },
|
||||
"MLeine": { "controller": TextEditingController(), "required": bool, },
|
||||
"BLand": { "controller": TextEditingController(), "required": bool, },
|
||||
"Lkr": { "controller": TextEditingController(), "required": bool, },
|
||||
"BeiOrt": { "controller": TextEditingController(), "required": bool, },
|
||||
"BimaNr": { "controller": TextEditingController(), "required": bool, },
|
||||
"BimaName": { "controller": TextEditingController(), "required": bool, },
|
||||
"BimaNutzer": { "controller": TextEditingController(), "required": bool, },
|
||||
"BimaAGV": { "controller": TextEditingController(), "required": bool, },
|
||||
Map<String, Map<String, dynamic>> rmap = {
|
||||
// Step 1
|
||||
"LogDat": {"controller": TextEditingController(), "required": bool},
|
||||
"Rudel": {"controller": TextEditingController(), "required": bool},
|
||||
"Teilnehm": {"controller": TextEditingController(), "required": bool},
|
||||
"Jahr": {"controller": TextEditingController(), "required": bool},
|
||||
"Dauer": {"controller": TextEditingController(), "required": bool},
|
||||
"MHund": {"controller": TextEditingController(), "required": bool},
|
||||
"MLeine": {"controller": TextEditingController(), "required": bool},
|
||||
"BLand": {"controller": TextEditingController(), "required": bool},
|
||||
"Lkr": {"controller": TextEditingController(), "required": bool},
|
||||
"BeiOrt": {"controller": TextEditingController(), "required": bool},
|
||||
"BimaNr": {"controller": TextEditingController(), "required": bool},
|
||||
"BimaName": {"controller": TextEditingController(), "required": bool},
|
||||
"BimaNutzer": {"controller": TextEditingController(), "required": bool},
|
||||
"BimaAGV": {"controller": TextEditingController(), "required": bool},
|
||||
|
||||
// Step 2
|
||||
"Wetter": { "controller": TextEditingController(), "required": bool, },
|
||||
"Temperat": { "controller": TextEditingController(), "required": bool, },
|
||||
"RegenVor": { "controller": TextEditingController(), "required": bool, },
|
||||
"KmAuto": { "controller": TextEditingController(), "required": bool, },
|
||||
"KmFuss": { "controller": TextEditingController(), "required": bool, },
|
||||
"KmRad": { "controller": TextEditingController(), "required": bool, },
|
||||
"KmTotal": { "controller": TextEditingController(), "required": bool, },
|
||||
"KmAuProz": { "controller": TextEditingController(), "required": bool, },
|
||||
"KmFuProz": { "controller": TextEditingController(), "required": bool, },
|
||||
"KmRaProz": { "controller": TextEditingController(), "required": bool, },
|
||||
// Step 2
|
||||
"Wetter": {"controller": TextEditingController(), "required": bool},
|
||||
"Temperat": {"controller": TextEditingController(), "required": bool},
|
||||
"RegenVor": {"controller": TextEditingController(), "required": bool},
|
||||
"KmAuto": {"controller": TextEditingController(), "required": bool},
|
||||
"KmFuss": {"controller": TextEditingController(), "required": bool},
|
||||
"KmRad": {"controller": TextEditingController(), "required": bool},
|
||||
"KmTotal": {"controller": TextEditingController(), "required": bool},
|
||||
"KmAuProz": {"controller": TextEditingController(), "required": bool},
|
||||
"KmFuProz": {"controller": TextEditingController(), "required": bool},
|
||||
"KmRaProz": {"controller": TextEditingController(), "required": bool},
|
||||
|
||||
// Spur maybe own step?
|
||||
"SpGut": { "controller": TextEditingController(), "required": bool, },
|
||||
"SpMittel": { "controller": TextEditingController(), "required": bool, },
|
||||
"SpSchlecht": { "controller": TextEditingController(), "required": bool, },
|
||||
"SpurFund": { "controller": TextEditingController(), "required": bool, },
|
||||
"SpurLang": { "controller": TextEditingController(), "required": bool, },
|
||||
"SpurTiere": { "controller": TextEditingController(), "required": bool, },
|
||||
"SpSicher": { "controller": TextEditingController(), "required": bool, },
|
||||
"WelpenSp": { "controller": TextEditingController(), "required": bool, },
|
||||
"WelpenAnz": { "controller": TextEditingController(), "required": bool, },
|
||||
"WpSicher": { "controller": TextEditingController(), "required": bool, },
|
||||
// Spur maybe own step?
|
||||
"SpGut": {"controller": TextEditingController(), "required": bool},
|
||||
"SpMittel": {"controller": TextEditingController(), "required": bool},
|
||||
"SpSchlecht": {"controller": TextEditingController(), "required": bool},
|
||||
"SpurFund": {"controller": TextEditingController(), "required": bool},
|
||||
"SpurLang": {"controller": TextEditingController(), "required": bool},
|
||||
"SpurTiere": {"controller": TextEditingController(), "required": bool},
|
||||
"SpSicher": {"controller": TextEditingController(), "required": bool},
|
||||
"WelpenSp": {"controller": TextEditingController(), "required": bool},
|
||||
"WelpenAnz": {"controller": TextEditingController(), "required": bool},
|
||||
"WpSicher": {"controller": TextEditingController(), "required": bool},
|
||||
|
||||
"LosungGes": { "controller": TextEditingController(), "required": bool, },
|
||||
"LosungAnz": { "controller": TextEditingController(), "required": bool, },
|
||||
"LosungGen": { "controller": TextEditingController(), "required": bool, },
|
||||
"UrinAnz": { "controller": TextEditingController(), "required": bool, },
|
||||
"UrinGen": { "controller": TextEditingController(), "required": bool, },
|
||||
"OestrAnz": { "controller": TextEditingController(), "required": bool, },
|
||||
"OestrGen": { "controller": TextEditingController(), "required": bool, },
|
||||
"HaarAnz": { "controller": TextEditingController(), "required": bool, },
|
||||
"HaarGen": { "controller": TextEditingController(), "required": bool, },
|
||||
"LosungKm": { "controller": TextEditingController(), "required": bool, },
|
||||
"GenetiKm": { "controller": TextEditingController(), "required": bool, },
|
||||
"Hinweise": { "controller": TextEditingController(), "required": bool, },
|
||||
"LosungGes": {"controller": TextEditingController(), "required": bool},
|
||||
"LosungAnz": {"controller": TextEditingController(), "required": bool},
|
||||
"LosungGen": {"controller": TextEditingController(), "required": bool},
|
||||
"UrinAnz": {"controller": TextEditingController(), "required": bool},
|
||||
"UrinGen": {"controller": TextEditingController(), "required": bool},
|
||||
"OestrAnz": {"controller": TextEditingController(), "required": bool},
|
||||
"OestrGen": {"controller": TextEditingController(), "required": bool},
|
||||
"HaarAnz": {"controller": TextEditingController(), "required": bool},
|
||||
"HaarGen": {"controller": TextEditingController(), "required": bool},
|
||||
"LosungKm": {"controller": TextEditingController(), "required": bool},
|
||||
"GenetiKm": {"controller": TextEditingController(), "required": bool},
|
||||
"Hinweise": {"controller": TextEditingController(), "required": bool},
|
||||
|
||||
// Step 3
|
||||
"Bemerk": { "controller": TextEditingController(), "required": bool, },
|
||||
"IntKomm": { "controller": TextEditingController(), "required": bool, },
|
||||
"FallNum": { "controller": TextEditingController(), "required": bool, },
|
||||
};
|
||||
// Step 3
|
||||
"Bemerk": {"controller": TextEditingController(), "required": bool},
|
||||
"IntKomm": {"controller": TextEditingController(), "required": bool},
|
||||
"FallNum": {"controller": TextEditingController(), "required": bool},
|
||||
};
|
||||
|
||||
Map<String, String> getFieldsText() {
|
||||
Map<String, String> puff = {};
|
||||
@@ -99,303 +99,282 @@ class _ExcursionMainState extends State<ExcursionMain> {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
List<Step> getSteps() => [
|
||||
Step(
|
||||
title: Text(AppLocalizations.of(context)!.dateandtime),
|
||||
content: Column(
|
||||
children: [
|
||||
// ---------- Date
|
||||
Datum(
|
||||
initDatum: DateTime.now(),
|
||||
onDateChanged: (date) {
|
||||
rmap["LogDat"]!["controller"]!.text = date.toString();
|
||||
},
|
||||
name: AppLocalizations.of(context)!.date,
|
||||
),
|
||||
const SizedBox(
|
||||
height: 10,
|
||||
),
|
||||
// ---------- Pack
|
||||
VarTextField(
|
||||
textController: rmap["Rudel"]!["controller"]!,
|
||||
localization: AppLocalizations.of(context)!.rudel,
|
||||
dbName: "Rudel",
|
||||
required: false,
|
||||
dbDesignation: DatabasesEnum.excursion,
|
||||
),
|
||||
const SizedBox(
|
||||
height: 10,
|
||||
),
|
||||
// ---------- Participants
|
||||
VarTextField(
|
||||
textController: rmap["Teilnehm"]!["controller"]!,
|
||||
localization: AppLocalizations.of(context)!.teilnehmer,
|
||||
dbName: "Teilnehm",
|
||||
required: false,
|
||||
dbDesignation: DatabasesEnum.excursion,
|
||||
),
|
||||
const SizedBox(
|
||||
height: 10,
|
||||
),
|
||||
// ---------- Duration
|
||||
VarTextField(
|
||||
textController: rmap["Dauer"]!["controller"]!,
|
||||
localization: AppLocalizations.of(context)!.dauer,
|
||||
dbName: "Dauer",
|
||||
required: false,
|
||||
dbDesignation: DatabasesEnum.excursion,
|
||||
),
|
||||
const SizedBox(
|
||||
height: 10,
|
||||
),
|
||||
// ---------- Dog(leash)
|
||||
HundULeine(onMHundChanged: (mHund, mLeine) {
|
||||
rmap["MHund"]!["controller"]!.text = mHund;
|
||||
rmap["MLeine"]!["controller"]!.text = mLeine;
|
||||
}),
|
||||
const SizedBox(
|
||||
height: 10,
|
||||
),
|
||||
// ---------- State
|
||||
VarTextField(
|
||||
textController: rmap["BLand"]!["controller"]!,
|
||||
localization: AppLocalizations.of(context)!.bland,
|
||||
dbName: "BLand",
|
||||
required: false,
|
||||
dbDesignation: DatabasesEnum.excursion,
|
||||
),
|
||||
const SizedBox(
|
||||
height: 10,
|
||||
),
|
||||
// ---------- Country
|
||||
VarTextField(
|
||||
textController: rmap["Lkr"]!["controller"]!,
|
||||
localization: AppLocalizations.of(context)!.lkr,
|
||||
dbName: "Lkr",
|
||||
required: false,
|
||||
dbDesignation: DatabasesEnum.excursion,
|
||||
),
|
||||
const SizedBox(
|
||||
height: 10,
|
||||
),
|
||||
// ---------- By State
|
||||
VarTextField(
|
||||
textController: rmap["BeiOrt"]!["controller"]!,
|
||||
localization: AppLocalizations.of(context)!.beiort,
|
||||
dbName: "BeiOrt",
|
||||
required: false,
|
||||
dbDesignation: DatabasesEnum.excursion,
|
||||
),
|
||||
const SizedBox(
|
||||
height: 10,
|
||||
),
|
||||
// ---------- Bima number
|
||||
const Divider(),
|
||||
const SizedBox(
|
||||
height: 10,
|
||||
),
|
||||
VarTextField(
|
||||
textController: rmap["BimaNr"]!["controller"]!,
|
||||
localization: AppLocalizations.of(context)!.bimaNr,
|
||||
dbName: "BimaNr",
|
||||
required: false,
|
||||
dbDesignation: DatabasesEnum.excursion,
|
||||
),
|
||||
const SizedBox(
|
||||
height: 10,
|
||||
),
|
||||
// ---------- Bima name
|
||||
VarTextField(
|
||||
textController: rmap["BimaName"]!["controller"]!,
|
||||
localization: AppLocalizations.of(context)!.bimaName,
|
||||
dbName: "BimaName",
|
||||
required: false,
|
||||
dbDesignation: DatabasesEnum.excursion,
|
||||
),
|
||||
const SizedBox(
|
||||
height: 10,
|
||||
),
|
||||
// ---------- Bima user
|
||||
BimaNutzer(onBimaNutzerChanged: (value) {
|
||||
setState(() {
|
||||
rmap["BimaNutzer"]!["controller"]!.text = value;
|
||||
});
|
||||
}),
|
||||
const SizedBox(
|
||||
height: 10,
|
||||
),
|
||||
// ---------- Bima AGV
|
||||
VarTextField(
|
||||
textController: rmap["BimaAGV"]!["controller"]!,
|
||||
localization: AppLocalizations.of(context)!.bimaAGV,
|
||||
dbName: "BimaAGV",
|
||||
required: false,
|
||||
dbDesignation: DatabasesEnum.excursion,
|
||||
)
|
||||
],
|
||||
)),
|
||||
Step(
|
||||
title: const Text("step2"),
|
||||
content: Column(
|
||||
children: [
|
||||
// ---------- Weather
|
||||
VarTextField(
|
||||
textController: rmap["Wetter"]!["controller"]!,
|
||||
localization: AppLocalizations.of(context)!.wetter,
|
||||
dbName: "Wetter",
|
||||
required: false,
|
||||
dbDesignation: DatabasesEnum.excursion,
|
||||
),
|
||||
const SizedBox(height: 10),
|
||||
// ---------- Temperature
|
||||
VarTextField(
|
||||
textController: rmap["Temperat"]!["controller"]!,
|
||||
localization: AppLocalizations.of(context)!.temperatur,
|
||||
dbName: "Temperat",
|
||||
required: false,
|
||||
dbDesignation: DatabasesEnum.excursion,
|
||||
),
|
||||
const SizedBox(height: 10),
|
||||
// ---------- Last precipitation
|
||||
LetzterNiederschlag(controller: rmap["RegenVor"]!["controller"]!),
|
||||
const SizedBox(height: 20),
|
||||
// ---------- Track conditions
|
||||
StreckeUSpurbedingungen(
|
||||
kmAutoController: rmap["KmAuto"]!["controller"]!,
|
||||
kmFussController: rmap["KmFuss"]!["controller"]!,
|
||||
kmRadController: rmap["KmRad"]!["controller"]!,
|
||||
spGutController: rmap["SpGut"]!["controller"]!,
|
||||
spMittelController: rmap["SpMittel"]!["controller"]!,
|
||||
spSchlechtController: rmap["SpSchlecht"]!["controller"]!,
|
||||
),
|
||||
const SizedBox(
|
||||
height: 20,
|
||||
),
|
||||
const Divider(),
|
||||
// ---------- Track found
|
||||
SpurGefunden(
|
||||
spurFund: rmap["SpurFund"]!["controller"]!,
|
||||
spurLang: rmap["SpurLang"]!["controller"]!,
|
||||
spurTiere: rmap["SpurTiere"]!["controller"]!,
|
||||
spSicher: rmap["SpSicher"]!["controller"]!,
|
||||
welpenSp: rmap["WelpenSp"]!["controller"]!,
|
||||
welpenAnz: rmap["WelpenAnz"]!["controller"]!,
|
||||
wpSicher: rmap["WpSicher"]!["controller"]!),
|
||||
const SizedBox(
|
||||
height: 20,
|
||||
),
|
||||
// ---------- Counts
|
||||
Anzahlen(
|
||||
losungAnz: rmap["LosungAnz"]!["controller"]!,
|
||||
losungGes: rmap["LosungGes"]!["controller"]!,
|
||||
losungGen: rmap["LosungGen"]!["controller"]!,
|
||||
urinAnz: rmap["UrinAnz"]!["controller"]!,
|
||||
urinGen: rmap["UrinGen"]!["controller"]!,
|
||||
oestrAnz: rmap["OestrAnz"]!["controller"]!,
|
||||
oestrGen: rmap["OestrGen"]!["controller"]!,
|
||||
haarAnz: rmap["HaarAnz"]!["controller"]!,
|
||||
haarGen: rmap["HaarGen"]!["controller"]!,
|
||||
),
|
||||
const SizedBox(
|
||||
height: 20,
|
||||
),
|
||||
const Divider(),
|
||||
const SizedBox(
|
||||
height: 20,
|
||||
),
|
||||
// ---------- Clues
|
||||
Align(
|
||||
alignment: Alignment.bottomLeft,
|
||||
child: Text(
|
||||
AppLocalizations.of(context)!.hinweise,
|
||||
style:
|
||||
Theme.of(context).textTheme.titleMedium,
|
||||
),
|
||||
),
|
||||
Hinweise(
|
||||
hinweise: rmap["Hinweise"]!["controller"]!,
|
||||
),
|
||||
],
|
||||
Step(
|
||||
title: Text(AppLocalizations.of(context)!.dateandtime),
|
||||
content: Column(
|
||||
children: [
|
||||
// ---------- Date
|
||||
Datum(
|
||||
initDatum: DateTime.now(),
|
||||
onDateChanged: (date) {
|
||||
rmap["LogDat"]!["controller"]!.text = date.toString();
|
||||
},
|
||||
name: AppLocalizations.of(context)!.date,
|
||||
),
|
||||
),
|
||||
Step(
|
||||
title: const Text("step3"),
|
||||
content: Column(
|
||||
children: [
|
||||
// ---------- Remarks
|
||||
VarTextField(
|
||||
textController: rmap["Bemerk"]!["controller"]!,
|
||||
localization: AppLocalizations.of(context)!.sonstbemerkungen,
|
||||
dbName: "Bemerk",
|
||||
required: false,
|
||||
dbDesignation: DatabasesEnum.excursion,
|
||||
),
|
||||
const SizedBox(
|
||||
height: 20,
|
||||
),
|
||||
// ---------- Internal communication
|
||||
VarTextField(
|
||||
textController: rmap["IntKomm"]!["controller"]!,
|
||||
localization: AppLocalizations.of(context)!.intkomm,
|
||||
dbName: "IntKomm",
|
||||
required: false,
|
||||
dbDesignation: DatabasesEnum.excursion,
|
||||
),
|
||||
],
|
||||
const SizedBox(height: 10),
|
||||
// ---------- Pack
|
||||
VarTextField(
|
||||
textController: rmap["Rudel"]!["controller"]!,
|
||||
localization: AppLocalizations.of(context)!.rudel,
|
||||
dbName: "Rudel",
|
||||
required: false,
|
||||
dbDesignation: DatabasesEnum.excursion,
|
||||
),
|
||||
),
|
||||
];
|
||||
const SizedBox(height: 10),
|
||||
// ---------- Participants
|
||||
VarTextField(
|
||||
textController: rmap["Teilnehm"]!["controller"]!,
|
||||
localization: AppLocalizations.of(context)!.teilnehmer,
|
||||
dbName: "Teilnehm",
|
||||
required: false,
|
||||
dbDesignation: DatabasesEnum.excursion,
|
||||
),
|
||||
const SizedBox(height: 10),
|
||||
// ---------- Duration
|
||||
VarTextField(
|
||||
textController: rmap["Dauer"]!["controller"]!,
|
||||
localization: AppLocalizations.of(context)!.dauer,
|
||||
dbName: "Dauer",
|
||||
required: false,
|
||||
dbDesignation: DatabasesEnum.excursion,
|
||||
),
|
||||
const SizedBox(height: 10),
|
||||
// ---------- Dog(leash)
|
||||
HundULeine(
|
||||
onMHundChanged: (mHund, mLeine) {
|
||||
rmap["MHund"]!["controller"]!.text = mHund;
|
||||
rmap["MLeine"]!["controller"]!.text = mLeine;
|
||||
},
|
||||
),
|
||||
const SizedBox(height: 10),
|
||||
// ---------- State
|
||||
VarTextField(
|
||||
textController: rmap["BLand"]!["controller"]!,
|
||||
localization: AppLocalizations.of(context)!.bland,
|
||||
dbName: "BLand",
|
||||
required: false,
|
||||
dbDesignation: DatabasesEnum.excursion,
|
||||
),
|
||||
const SizedBox(height: 10),
|
||||
// ---------- Country
|
||||
VarTextField(
|
||||
textController: rmap["Lkr"]!["controller"]!,
|
||||
localization: AppLocalizations.of(context)!.lkr,
|
||||
dbName: "Lkr",
|
||||
required: false,
|
||||
dbDesignation: DatabasesEnum.excursion,
|
||||
),
|
||||
const SizedBox(height: 10),
|
||||
// ---------- By State
|
||||
VarTextField(
|
||||
textController: rmap["BeiOrt"]!["controller"]!,
|
||||
localization: AppLocalizations.of(context)!.beiort,
|
||||
dbName: "BeiOrt",
|
||||
required: false,
|
||||
dbDesignation: DatabasesEnum.excursion,
|
||||
),
|
||||
const SizedBox(height: 10),
|
||||
// ---------- Bima number
|
||||
const Divider(),
|
||||
const SizedBox(height: 10),
|
||||
VarTextField(
|
||||
textController: rmap["BimaNr"]!["controller"]!,
|
||||
localization: AppLocalizations.of(context)!.bimaNr,
|
||||
dbName: "BimaNr",
|
||||
required: false,
|
||||
dbDesignation: DatabasesEnum.excursion,
|
||||
),
|
||||
const SizedBox(height: 10),
|
||||
// ---------- Bima name
|
||||
VarTextField(
|
||||
textController: rmap["BimaName"]!["controller"]!,
|
||||
localization: AppLocalizations.of(context)!.bimaName,
|
||||
dbName: "BimaName",
|
||||
required: false,
|
||||
dbDesignation: DatabasesEnum.excursion,
|
||||
),
|
||||
const SizedBox(height: 10),
|
||||
// ---------- Bima user
|
||||
BimaNutzer(
|
||||
onBimaNutzerChanged: (value) {
|
||||
setState(() {
|
||||
rmap["BimaNutzer"]!["controller"]!.text = value;
|
||||
});
|
||||
},
|
||||
),
|
||||
const SizedBox(height: 10),
|
||||
// ---------- Bima AGV
|
||||
VarTextField(
|
||||
textController: rmap["BimaAGV"]!["controller"]!,
|
||||
localization: AppLocalizations.of(context)!.bimaAGV,
|
||||
dbName: "BimaAGV",
|
||||
required: false,
|
||||
dbDesignation: DatabasesEnum.excursion,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
Step(
|
||||
title: const Text("step2"),
|
||||
content: Column(
|
||||
children: [
|
||||
// ---------- Weather
|
||||
VarTextField(
|
||||
textController: rmap["Wetter"]!["controller"]!,
|
||||
localization: AppLocalizations.of(context)!.wetter,
|
||||
dbName: "Wetter",
|
||||
required: false,
|
||||
dbDesignation: DatabasesEnum.excursion,
|
||||
),
|
||||
const SizedBox(height: 10),
|
||||
// ---------- Temperature
|
||||
VarTextField(
|
||||
textController: rmap["Temperat"]!["controller"]!,
|
||||
localization: AppLocalizations.of(context)!.temperatur,
|
||||
dbName: "Temperat",
|
||||
required: false,
|
||||
dbDesignation: DatabasesEnum.excursion,
|
||||
),
|
||||
const SizedBox(height: 10),
|
||||
// ---------- Last precipitation
|
||||
LetzterNiederschlag(controller: rmap["RegenVor"]!["controller"]!),
|
||||
const SizedBox(height: 20),
|
||||
// ---------- Track conditions
|
||||
StreckeUSpurbedingungen(
|
||||
kmAutoController: rmap["KmAuto"]!["controller"]!,
|
||||
kmFussController: rmap["KmFuss"]!["controller"]!,
|
||||
kmRadController: rmap["KmRad"]!["controller"]!,
|
||||
spGutController: rmap["SpGut"]!["controller"]!,
|
||||
spMittelController: rmap["SpMittel"]!["controller"]!,
|
||||
spSchlechtController: rmap["SpSchlecht"]!["controller"]!,
|
||||
),
|
||||
const SizedBox(height: 20),
|
||||
const Divider(),
|
||||
// ---------- Track found
|
||||
SpurGefunden(
|
||||
spurFund: rmap["SpurFund"]!["controller"]!,
|
||||
spurLang: rmap["SpurLang"]!["controller"]!,
|
||||
spurTiere: rmap["SpurTiere"]!["controller"]!,
|
||||
spSicher: rmap["SpSicher"]!["controller"]!,
|
||||
welpenSp: rmap["WelpenSp"]!["controller"]!,
|
||||
welpenAnz: rmap["WelpenAnz"]!["controller"]!,
|
||||
wpSicher: rmap["WpSicher"]!["controller"]!,
|
||||
),
|
||||
const SizedBox(height: 20),
|
||||
// ---------- Counts
|
||||
Anzahlen(
|
||||
losungAnz: rmap["LosungAnz"]!["controller"]!,
|
||||
losungGes: rmap["LosungGes"]!["controller"]!,
|
||||
losungGen: rmap["LosungGen"]!["controller"]!,
|
||||
urinAnz: rmap["UrinAnz"]!["controller"]!,
|
||||
urinGen: rmap["UrinGen"]!["controller"]!,
|
||||
oestrAnz: rmap["OestrAnz"]!["controller"]!,
|
||||
oestrGen: rmap["OestrGen"]!["controller"]!,
|
||||
haarAnz: rmap["HaarAnz"]!["controller"]!,
|
||||
haarGen: rmap["HaarGen"]!["controller"]!,
|
||||
),
|
||||
const SizedBox(height: 20),
|
||||
const Divider(),
|
||||
const SizedBox(height: 20),
|
||||
// ---------- Clues
|
||||
Align(
|
||||
alignment: Alignment.bottomLeft,
|
||||
child: Text(
|
||||
AppLocalizations.of(context)!.hinweise,
|
||||
style: Theme.of(context).textTheme.titleMedium,
|
||||
),
|
||||
),
|
||||
Hinweise(hinweise: rmap["Hinweise"]!["controller"]!),
|
||||
],
|
||||
),
|
||||
),
|
||||
Step(
|
||||
title: const Text("step3"),
|
||||
content: Column(
|
||||
children: [
|
||||
// ---------- Remarks
|
||||
VarTextField(
|
||||
textController: rmap["Bemerk"]!["controller"]!,
|
||||
localization: AppLocalizations.of(context)!.sonstbemerkungen,
|
||||
dbName: "Bemerk",
|
||||
required: false,
|
||||
dbDesignation: DatabasesEnum.excursion,
|
||||
),
|
||||
const SizedBox(height: 20),
|
||||
// ---------- Internal communication
|
||||
VarTextField(
|
||||
textController: rmap["IntKomm"]!["controller"]!,
|
||||
localization: AppLocalizations.of(context)!.intkomm,
|
||||
dbName: "IntKomm",
|
||||
required: false,
|
||||
dbDesignation: DatabasesEnum.excursion,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
];
|
||||
|
||||
// Begin of widget tree
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
title: Text(AppLocalizations.of(context)!.excursion),
|
||||
),
|
||||
body: PageTransitionSwitcher(
|
||||
duration: const Duration(microseconds: 800),
|
||||
transitionBuilder: (Widget child, Animation<double> animation,
|
||||
Animation<double> secondaryAnimation) {
|
||||
return SharedAxisTransition(
|
||||
animation: animation,
|
||||
secondaryAnimation: secondaryAnimation,
|
||||
transitionType: SharedAxisTransitionType.vertical,
|
||||
child: child,
|
||||
);
|
||||
appBar: AppBar(title: Text(AppLocalizations.of(context)!.excursion)),
|
||||
body: PageTransitionSwitcher(
|
||||
duration: const Duration(microseconds: 800),
|
||||
transitionBuilder: (
|
||||
Widget child,
|
||||
Animation<double> animation,
|
||||
Animation<double> secondaryAnimation,
|
||||
) {
|
||||
return SharedAxisTransition(
|
||||
animation: animation,
|
||||
secondaryAnimation: secondaryAnimation,
|
||||
transitionType: SharedAxisTransitionType.vertical,
|
||||
child: child,
|
||||
);
|
||||
},
|
||||
child: Stepper(
|
||||
key: ValueKey<int>(currentStep),
|
||||
steps: getSteps(),
|
||||
currentStep: currentStep,
|
||||
onStepTapped: (value) {
|
||||
setState(() {
|
||||
currentStep = value;
|
||||
});
|
||||
},
|
||||
child: Stepper(
|
||||
key: ValueKey<int>(currentStep),
|
||||
steps: getSteps(),
|
||||
currentStep: currentStep,
|
||||
onStepTapped: (value) {
|
||||
setState(() {
|
||||
currentStep = value;
|
||||
});
|
||||
},
|
||||
onStepContinue: () async {
|
||||
final isLastStep = currentStep == getSteps().length - 1;
|
||||
onStepContinue: () async {
|
||||
final isLastStep = currentStep == getSteps().length - 1;
|
||||
|
||||
if (!isLastStep) {
|
||||
setState(() {
|
||||
currentStep += 1;
|
||||
});
|
||||
if (!isLastStep) {
|
||||
setState(() {
|
||||
currentStep += 1;
|
||||
});
|
||||
} else {
|
||||
bool empty = CheckRequired.checkRequired(rmap);
|
||||
if (empty) {
|
||||
await AddEntriesDialogHelper.showTemplateDialog(
|
||||
context,
|
||||
getFieldsText(),
|
||||
false,
|
||||
);
|
||||
} else {
|
||||
bool empty = CheckRequired.checkRequired(rmap);
|
||||
if (empty) {
|
||||
await DialogHelper.showTemplateDialog(context, getFieldsText(), false);
|
||||
} else {
|
||||
await DialogHelper.showSaveOptionsDialog(context, getFieldsText(), false);
|
||||
}
|
||||
await AddEntriesDialogHelper.showSaveOptionsDialog(
|
||||
context,
|
||||
getFieldsText(),
|
||||
false,
|
||||
);
|
||||
}
|
||||
},
|
||||
onStepCancel: () {
|
||||
if (currentStep == 0) {
|
||||
Navigator.pop(context);
|
||||
} else {
|
||||
setState(() {
|
||||
currentStep -= 1;
|
||||
});
|
||||
}
|
||||
},
|
||||
),
|
||||
));
|
||||
}
|
||||
},
|
||||
onStepCancel: () {
|
||||
if (currentStep == 0) {
|
||||
Navigator.pop(context);
|
||||
} else {
|
||||
setState(() {
|
||||
currentStep -= 1;
|
||||
});
|
||||
}
|
||||
},
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user