outsourced all methods and dialogs as far as possible (I think)
This commit is contained in:
386
lib/screens/excursion/excursion_main.dart
Normal file
386
lib/screens/excursion/excursion_main.dart
Normal file
@@ -0,0 +1,386 @@
|
||||
import 'package:animations/animations.dart';
|
||||
import 'package:fforte/enums/databases.dart';
|
||||
import 'package:fforte/screens/excursion/widgets/anzahlen.dart';
|
||||
import 'package:fforte/screens/excursion/widgets/bima_nutzer.dart';
|
||||
import 'package:fforte/screens/excursion/widgets/hinweise.dart';
|
||||
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/sharedWidgets/datum.dart';
|
||||
import 'package:fforte/screens/sharedWidgets/var_text_field.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
|
||||
|
||||
class ExcursionMain extends StatefulWidget {
|
||||
const ExcursionMain({super.key});
|
||||
|
||||
@override
|
||||
State<ExcursionMain> createState() => _ExcursionMainState();
|
||||
}
|
||||
|
||||
class _ExcursionMainState extends State<ExcursionMain> {
|
||||
// all TextEditingController because its easier
|
||||
|
||||
Map<String, TextEditingController> getFieldsController() {
|
||||
Map<String, TextEditingController> rmap = {
|
||||
// Step 1
|
||||
"LogDat": TextEditingController(),
|
||||
"Rudel": TextEditingController(),
|
||||
"Teilnehm": TextEditingController(),
|
||||
"Jahr": TextEditingController(),
|
||||
"Dauer": TextEditingController(),
|
||||
"MHund": TextEditingController(),
|
||||
"MLeine": TextEditingController(),
|
||||
"BLand": TextEditingController(),
|
||||
"Lkr": TextEditingController(),
|
||||
"BeiOrt": TextEditingController(),
|
||||
"BimaNr": TextEditingController(),
|
||||
"BimaName": TextEditingController(),
|
||||
"BimaNutzer": TextEditingController(),
|
||||
"BimaAGV": TextEditingController(),
|
||||
|
||||
// Step 2
|
||||
"Wetter": TextEditingController(),
|
||||
"Temperat": TextEditingController(),
|
||||
"RegenVor": TextEditingController(),
|
||||
"KmAuto": TextEditingController(),
|
||||
"KmFuss": TextEditingController(),
|
||||
"KmRad": TextEditingController(),
|
||||
"KmTotal": TextEditingController(),
|
||||
"KmAuProz": TextEditingController(),
|
||||
"KmFuProz": TextEditingController(),
|
||||
"KmRaProz": TextEditingController(),
|
||||
|
||||
// Spur maybe own step?
|
||||
"SpGut": TextEditingController(),
|
||||
"SpMittel": TextEditingController(),
|
||||
"SpSchlecht": TextEditingController(),
|
||||
"SpurFund": TextEditingController(),
|
||||
"SpurLang": TextEditingController(),
|
||||
"SpurTiere": TextEditingController(),
|
||||
"SpSicher": TextEditingController(),
|
||||
"WelpenSp": TextEditingController(),
|
||||
"WelpenAnz": TextEditingController(),
|
||||
"WpSicher": TextEditingController(),
|
||||
|
||||
"LosungGes": TextEditingController(),
|
||||
"LosungAnz": TextEditingController(),
|
||||
"LosungGen": TextEditingController(),
|
||||
"UrinAnz": TextEditingController(),
|
||||
"UrinGen": TextEditingController(),
|
||||
"OestrAnz": TextEditingController(),
|
||||
"OestrGen": TextEditingController(),
|
||||
"HaarAnz": TextEditingController(),
|
||||
"HaarGen": TextEditingController(),
|
||||
"LosungKm": TextEditingController(),
|
||||
"GenetiKm": TextEditingController(),
|
||||
"Hinweise": TextEditingController(),
|
||||
|
||||
// Step 3
|
||||
"Bemerk": TextEditingController(),
|
||||
"IntKomm": TextEditingController(),
|
||||
"FallNum": TextEditingController(),
|
||||
};
|
||||
|
||||
return rmap;
|
||||
}
|
||||
|
||||
int currentStep = 0;
|
||||
|
||||
@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) {
|
||||
getFieldsController()["LogDat"]!.text = date.toString();
|
||||
},
|
||||
name: AppLocalizations.of(context)!.date,
|
||||
),
|
||||
const SizedBox(
|
||||
height: 10,
|
||||
),
|
||||
// ---------- Pack
|
||||
VarTextField(
|
||||
textController: getFieldsController()["Rudel"]!,
|
||||
localization: AppLocalizations.of(context)!.rudel,
|
||||
dbName: "Rudel",
|
||||
required: false,
|
||||
dbDesignation: DatabasesEnum.excursion,
|
||||
),
|
||||
const SizedBox(
|
||||
height: 10,
|
||||
),
|
||||
// ---------- Participants
|
||||
VarTextField(
|
||||
textController: getFieldsController()["Teilnehm"]!,
|
||||
localization: AppLocalizations.of(context)!.teilnehmer,
|
||||
dbName: "Teilnehm",
|
||||
required: false,
|
||||
dbDesignation: DatabasesEnum.excursion,
|
||||
),
|
||||
const SizedBox(
|
||||
height: 10,
|
||||
),
|
||||
// ---------- Duration
|
||||
VarTextField(
|
||||
textController: getFieldsController()["Dauer"]!,
|
||||
localization: AppLocalizations.of(context)!.dauer,
|
||||
dbName: "Dauer",
|
||||
required: false,
|
||||
dbDesignation: DatabasesEnum.excursion,
|
||||
),
|
||||
const SizedBox(
|
||||
height: 10,
|
||||
),
|
||||
// ---------- Dog(leash)
|
||||
HundULeine(onMHundChanged: (mHund, mLeine) {
|
||||
getFieldsController()["MHund"]!.text = mHund;
|
||||
getFieldsController()["MLeine"]!.text = mLeine;
|
||||
}),
|
||||
const SizedBox(
|
||||
height: 10,
|
||||
),
|
||||
// ---------- State
|
||||
VarTextField(
|
||||
textController: getFieldsController()["BLand"]!,
|
||||
localization: AppLocalizations.of(context)!.bland,
|
||||
dbName: "BLand",
|
||||
required: false,
|
||||
dbDesignation: DatabasesEnum.excursion,
|
||||
),
|
||||
const SizedBox(
|
||||
height: 10,
|
||||
),
|
||||
// ---------- Country
|
||||
VarTextField(
|
||||
textController: getFieldsController()["Lkr"]!,
|
||||
localization: AppLocalizations.of(context)!.lkr,
|
||||
dbName: "Lkr",
|
||||
required: false,
|
||||
dbDesignation: DatabasesEnum.excursion,
|
||||
),
|
||||
const SizedBox(
|
||||
height: 10,
|
||||
),
|
||||
// ---------- By State
|
||||
VarTextField(
|
||||
textController: getFieldsController()["BeiOrt"]!,
|
||||
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: getFieldsController()["BimaNr"]!,
|
||||
localization: AppLocalizations.of(context)!.bimaNr,
|
||||
dbName: "BimaNr",
|
||||
required: false,
|
||||
dbDesignation: DatabasesEnum.excursion,
|
||||
),
|
||||
const SizedBox(
|
||||
height: 10,
|
||||
),
|
||||
// ---------- Bima name
|
||||
VarTextField(
|
||||
textController: getFieldsController()["BimaName"]!,
|
||||
localization: AppLocalizations.of(context)!.bimaName,
|
||||
dbName: "BimaName",
|
||||
required: false,
|
||||
dbDesignation: DatabasesEnum.excursion,
|
||||
),
|
||||
const SizedBox(
|
||||
height: 10,
|
||||
),
|
||||
// ---------- Bima user
|
||||
BimaNutzer(onBimaNutzerChanged: (value) {
|
||||
setState(() {
|
||||
getFieldsController()["BimaNutzer"]!.text = value;
|
||||
});
|
||||
}),
|
||||
const SizedBox(
|
||||
height: 10,
|
||||
),
|
||||
// ---------- Bima AGV
|
||||
VarTextField(
|
||||
textController: getFieldsController()["BimaAGV"]!,
|
||||
localization: AppLocalizations.of(context)!.bimaAGV,
|
||||
dbName: "BimaAGV",
|
||||
required: false,
|
||||
dbDesignation: DatabasesEnum.excursion,
|
||||
)
|
||||
],
|
||||
)),
|
||||
Step(
|
||||
title: const Text("step2"),
|
||||
content: Column(
|
||||
children: [
|
||||
// ---------- Weather
|
||||
VarTextField(
|
||||
textController: getFieldsController()["Wetter"]!,
|
||||
localization: AppLocalizations.of(context)!.wetter,
|
||||
dbName: "Wetter",
|
||||
required: false,
|
||||
dbDesignation: DatabasesEnum.excursion,
|
||||
),
|
||||
const SizedBox(height: 10),
|
||||
// ---------- Temperature
|
||||
VarTextField(
|
||||
textController: getFieldsController()["Temperat"]!,
|
||||
localization: AppLocalizations.of(context)!.temperatur,
|
||||
dbName: "Temperat",
|
||||
required: false,
|
||||
dbDesignation: DatabasesEnum.excursion,
|
||||
),
|
||||
const SizedBox(height: 10),
|
||||
// ---------- Last precipitation
|
||||
LetzterNiederschlag(controller: getFieldsController()["RegenVor"]!),
|
||||
const SizedBox(height: 20),
|
||||
// ---------- Track conditions
|
||||
StreckeUSpurbedingungen(
|
||||
kmAutoController: getFieldsController()["KmAuto"]!,
|
||||
kmFussController: getFieldsController()["KmFuss"]!,
|
||||
kmRadController: getFieldsController()["KmRad"]!,
|
||||
spGutController: getFieldsController()["SpGut"]!,
|
||||
spMittelController: getFieldsController()["SpMittel"]!,
|
||||
spSchlechtController: getFieldsController()["SpSchlecht"]!,
|
||||
),
|
||||
const SizedBox(
|
||||
height: 20,
|
||||
),
|
||||
const Divider(),
|
||||
// ---------- Track found
|
||||
SpurGefunden(
|
||||
spurFund: getFieldsController()["SpurFund"]!,
|
||||
spurLang: getFieldsController()["SpurLang"]!,
|
||||
spurTiere: getFieldsController()["SpurTiere"]!,
|
||||
spSicher: getFieldsController()["SpSicher"]!,
|
||||
welpenSp: getFieldsController()["WelpenSp"]!,
|
||||
welpenAnz: getFieldsController()["WelpenAnz"]!,
|
||||
wpSicher: getFieldsController()["WpSicher"]!),
|
||||
const SizedBox(
|
||||
height: 20,
|
||||
),
|
||||
// ---------- Counts
|
||||
Anzahlen(
|
||||
losungAnz: getFieldsController()["LosungAnz"]!,
|
||||
losungGes: getFieldsController()["LosungGes"]!,
|
||||
losungGen: getFieldsController()["LosungGen"]!,
|
||||
urinAnz: getFieldsController()["UrinAnz"]!,
|
||||
urinGen: getFieldsController()["UrinGen"]!,
|
||||
oestrAnz: getFieldsController()["OestrAnz"]!,
|
||||
oestrGen: getFieldsController()["OestrGen"]!,
|
||||
haarAnz: getFieldsController()["HaarAnz"]!,
|
||||
haarGen: getFieldsController()["HaarGen"]!,
|
||||
),
|
||||
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: getFieldsController()["Hinweise"]!,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
Step(
|
||||
title: const Text("step3"),
|
||||
content: Column(
|
||||
children: [
|
||||
// ---------- Remarks
|
||||
VarTextField(
|
||||
textController: getFieldsController()["Bemerk"]!,
|
||||
localization: AppLocalizations.of(context)!.sonstbemerkungen,
|
||||
dbName: "Bemerk",
|
||||
required: false,
|
||||
dbDesignation: DatabasesEnum.excursion,
|
||||
),
|
||||
const SizedBox(
|
||||
height: 20,
|
||||
),
|
||||
// ---------- Internal communication
|
||||
VarTextField(
|
||||
textController: getFieldsController()["IntKomm"]!,
|
||||
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,
|
||||
);
|
||||
},
|
||||
child: Stepper(
|
||||
key: ValueKey<int>(currentStep),
|
||||
steps: getSteps(),
|
||||
currentStep: currentStep,
|
||||
onStepTapped: (value) {
|
||||
setState(() {
|
||||
currentStep = value;
|
||||
});
|
||||
},
|
||||
onStepContinue: () {
|
||||
final isLastStep = currentStep == getSteps().length - 1;
|
||||
|
||||
if (!isLastStep) {
|
||||
setState(() {
|
||||
currentStep += 1;
|
||||
});
|
||||
}
|
||||
},
|
||||
onStepCancel: () {
|
||||
if (currentStep == 0) {
|
||||
Navigator.pop(context);
|
||||
} else {
|
||||
setState(() {
|
||||
currentStep -= 1;
|
||||
});
|
||||
}
|
||||
},
|
||||
),
|
||||
));
|
||||
}
|
||||
}
|
||||
228
lib/screens/excursion/widgets/anzahlen.dart
Normal file
228
lib/screens/excursion/widgets/anzahlen.dart
Normal file
@@ -0,0 +1,228 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
|
||||
|
||||
class Anzahlen extends StatefulWidget {
|
||||
final TextEditingController losungAnz;
|
||||
final TextEditingController losungGes;
|
||||
final TextEditingController losungGen;
|
||||
final TextEditingController urinAnz;
|
||||
final TextEditingController urinGen;
|
||||
final TextEditingController oestrAnz;
|
||||
final TextEditingController oestrGen;
|
||||
final TextEditingController haarAnz;
|
||||
final TextEditingController haarGen;
|
||||
|
||||
const Anzahlen(
|
||||
{super.key,
|
||||
required this.losungAnz,
|
||||
required this.losungGes,
|
||||
required this.losungGen,
|
||||
required this.urinAnz,
|
||||
required this.urinGen,
|
||||
required this.oestrAnz,
|
||||
required this.oestrGen,
|
||||
required this.haarAnz,
|
||||
required this.haarGen});
|
||||
|
||||
@override
|
||||
AnzahlenState createState() => AnzahlenState();
|
||||
}
|
||||
|
||||
class AnzahlenState extends State<Anzahlen> {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Column(
|
||||
children: [
|
||||
Column(
|
||||
children: [
|
||||
Column(
|
||||
children: [
|
||||
Row(
|
||||
children: [
|
||||
Expanded(
|
||||
flex: 2,
|
||||
child: Align(
|
||||
alignment: Alignment.bottomLeft,
|
||||
child: Text(
|
||||
AppLocalizations.of(context)!.anzahlLosungen)),
|
||||
),
|
||||
const SizedBox(
|
||||
width: 20,
|
||||
),
|
||||
Expanded(
|
||||
child: Align(
|
||||
alignment: Alignment.centerLeft, child: TextField()),
|
||||
),
|
||||
const SizedBox(
|
||||
width: 20,
|
||||
),
|
||||
Expanded(
|
||||
flex: 2,
|
||||
child: Align(
|
||||
alignment: Alignment.bottomLeft,
|
||||
child: Text(
|
||||
AppLocalizations.of(context)!.davonEingesammelt)),
|
||||
),
|
||||
const SizedBox(
|
||||
width: 20,
|
||||
),
|
||||
Expanded(
|
||||
child: Align(
|
||||
alignment: Alignment.centerLeft, child: TextField()),
|
||||
),
|
||||
const SizedBox(
|
||||
height: 20,
|
||||
),
|
||||
],
|
||||
),
|
||||
Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.end,
|
||||
children: [
|
||||
Expanded(
|
||||
flex: 6,
|
||||
child: Align(
|
||||
alignment: Alignment.bottomLeft,
|
||||
child: Text(
|
||||
AppLocalizations.of(context)!.davonGenetikproben),
|
||||
),
|
||||
),
|
||||
const SizedBox(
|
||||
width: 20,
|
||||
),
|
||||
Expanded(
|
||||
child: Align(
|
||||
alignment: Alignment.centerLeft, child: TextField()),
|
||||
),
|
||||
],
|
||||
),
|
||||
const Divider(
|
||||
height: 40,
|
||||
),
|
||||
Row(
|
||||
children: [
|
||||
Expanded(
|
||||
flex: 2,
|
||||
child: Align(
|
||||
alignment: Alignment.bottomLeft,
|
||||
child: Text(AppLocalizations.of(context)!
|
||||
.anzahlUrinMakierstellen)),
|
||||
),
|
||||
const SizedBox(
|
||||
width: 20,
|
||||
),
|
||||
Expanded(
|
||||
child: Align(
|
||||
alignment: Alignment.centerLeft, child: TextField()),
|
||||
),
|
||||
const SizedBox(
|
||||
width: 20,
|
||||
),
|
||||
Expanded(
|
||||
flex: 2,
|
||||
child: Align(
|
||||
alignment: Alignment.bottomLeft,
|
||||
child: Text(AppLocalizations.of(context)!
|
||||
.davonGenetikproben)),
|
||||
),
|
||||
const SizedBox(
|
||||
width: 20,
|
||||
),
|
||||
Expanded(
|
||||
child: Align(
|
||||
alignment: Alignment.centerLeft, child: TextField()),
|
||||
),
|
||||
const SizedBox(
|
||||
height: 20,
|
||||
),
|
||||
],
|
||||
),
|
||||
const Divider(
|
||||
height: 40,
|
||||
),
|
||||
Row(
|
||||
children: [
|
||||
Expanded(
|
||||
flex: 2,
|
||||
child: Align(
|
||||
alignment: Alignment.bottomLeft,
|
||||
child: Text(
|
||||
AppLocalizations.of(context)!.anzahlOestrusblut)),
|
||||
),
|
||||
const SizedBox(
|
||||
width: 20,
|
||||
),
|
||||
Expanded(
|
||||
child: Align(
|
||||
alignment: Alignment.centerLeft, child: TextField()),
|
||||
),
|
||||
const SizedBox(
|
||||
width: 20,
|
||||
),
|
||||
Expanded(
|
||||
flex: 2,
|
||||
child: Align(
|
||||
alignment: Alignment.bottomLeft,
|
||||
child: Text(AppLocalizations.of(context)!
|
||||
.davonGenetikproben)),
|
||||
),
|
||||
const SizedBox(
|
||||
width: 20,
|
||||
),
|
||||
Expanded(
|
||||
child: Align(
|
||||
alignment: Alignment.centerLeft, child: TextField()),
|
||||
),
|
||||
const SizedBox(
|
||||
height: 20,
|
||||
),
|
||||
],
|
||||
),
|
||||
const Divider(
|
||||
height: 40,
|
||||
),
|
||||
Row(
|
||||
children: [
|
||||
Expanded(
|
||||
flex: 2,
|
||||
child: Align(
|
||||
alignment: Alignment.bottomLeft,
|
||||
child: Text(
|
||||
AppLocalizations.of(context)!.anzahlHaarproben)),
|
||||
),
|
||||
const SizedBox(
|
||||
width: 20,
|
||||
),
|
||||
Expanded(
|
||||
child: Align(
|
||||
alignment: Alignment.centerLeft, child: TextField()),
|
||||
),
|
||||
const SizedBox(
|
||||
width: 20,
|
||||
),
|
||||
Expanded(
|
||||
flex: 2,
|
||||
child: Align(
|
||||
alignment: Alignment.bottomLeft,
|
||||
child: Text(AppLocalizations.of(context)!
|
||||
.davonGenetikproben)),
|
||||
),
|
||||
const SizedBox(
|
||||
width: 20,
|
||||
),
|
||||
Expanded(
|
||||
child: Align(
|
||||
alignment: Alignment.centerLeft, child: TextField()),
|
||||
),
|
||||
const SizedBox(
|
||||
height: 20,
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
)
|
||||
],
|
||||
)
|
||||
],
|
||||
);
|
||||
}
|
||||
}
|
||||
107
lib/screens/excursion/widgets/bima_nutzer.dart
Normal file
107
lib/screens/excursion/widgets/bima_nutzer.dart
Normal file
@@ -0,0 +1,107 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
|
||||
|
||||
// Bundeswehr
|
||||
// Gastreitkraefte
|
||||
// NNE Bund
|
||||
// Geschaeftsliegenschaft/AGV
|
||||
// kein
|
||||
|
||||
class BimaNutzer extends StatefulWidget {
|
||||
final Function(String) onBimaNutzerChanged;
|
||||
final String initialStatus;
|
||||
|
||||
const BimaNutzer(
|
||||
{super.key, required this.onBimaNutzerChanged, this.initialStatus = 'Bundeswehr'});
|
||||
|
||||
@override
|
||||
State<BimaNutzer> createState() => _StatusState();
|
||||
}
|
||||
|
||||
class _StatusState extends State<BimaNutzer> {
|
||||
String? _selectedStatus;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
_selectedStatus = widget.initialStatus;
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Column(
|
||||
children: [
|
||||
ListTile(
|
||||
visualDensity: const VisualDensity(vertical: -4),
|
||||
title: Text(AppLocalizations.of(context)!.bundeswehr),
|
||||
leading: Radio<String>(
|
||||
value: 'Bundeswehr',
|
||||
groupValue: _selectedStatus,
|
||||
onChanged: (value) {
|
||||
setState(() {
|
||||
_selectedStatus = value;
|
||||
widget.onBimaNutzerChanged(value!);
|
||||
});
|
||||
},
|
||||
),
|
||||
),
|
||||
ListTile(
|
||||
visualDensity: const VisualDensity(vertical: -4),
|
||||
title: Text(AppLocalizations.of(context)!.gaststreitkraefte),
|
||||
leading: Radio<String>(
|
||||
value: 'Gaststreitkraefte',
|
||||
groupValue: _selectedStatus,
|
||||
onChanged: (value) {
|
||||
setState(() {
|
||||
_selectedStatus = value;
|
||||
widget.onBimaNutzerChanged(value!);
|
||||
});
|
||||
},
|
||||
),
|
||||
),
|
||||
ListTile(
|
||||
visualDensity: const VisualDensity(vertical: -4),
|
||||
title: Text(AppLocalizations.of(context)!.nneBund),
|
||||
leading: Radio<String>(
|
||||
value: 'NNE-Bund',
|
||||
groupValue: _selectedStatus,
|
||||
onChanged: (value) {
|
||||
setState(() {
|
||||
_selectedStatus = value;
|
||||
widget.onBimaNutzerChanged(value!);
|
||||
});
|
||||
},
|
||||
),
|
||||
),
|
||||
ListTile(
|
||||
visualDensity: const VisualDensity(vertical: -4),
|
||||
title: Text(AppLocalizations.of(context)!.geschaeftsliegenschaftAGV),
|
||||
leading: Radio<String>(
|
||||
value: 'Geschaeftsliegenschaft/AGV',
|
||||
groupValue: _selectedStatus,
|
||||
onChanged: (value) {
|
||||
setState(() {
|
||||
_selectedStatus = value;
|
||||
widget.onBimaNutzerChanged(value!);
|
||||
});
|
||||
},
|
||||
),
|
||||
),
|
||||
ListTile(
|
||||
visualDensity: const VisualDensity(vertical: -4),
|
||||
title: Text(AppLocalizations.of(context)!.kein),
|
||||
leading: Radio<String>(
|
||||
value: 'kein',
|
||||
groupValue: _selectedStatus,
|
||||
onChanged: (value) {
|
||||
setState(() {
|
||||
_selectedStatus = value;
|
||||
widget.onBimaNutzerChanged(value!);
|
||||
});
|
||||
},
|
||||
),
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
}
|
||||
113
lib/screens/excursion/widgets/hinweise.dart
Normal file
113
lib/screens/excursion/widgets/hinweise.dart
Normal file
@@ -0,0 +1,113 @@
|
||||
import 'package:fforte/enums/databases.dart';
|
||||
import 'package:fforte/screens/sharedWidgets/var_text_field.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
|
||||
|
||||
class Hinweise extends StatefulWidget {
|
||||
final TextEditingController hinweise;
|
||||
|
||||
const Hinweise({super.key, required this.hinweise});
|
||||
|
||||
@override
|
||||
State<Hinweise> createState() => _HinweiseState();
|
||||
}
|
||||
|
||||
class _HinweiseState extends State<Hinweise> {
|
||||
// Vars for Checkboxes
|
||||
bool liegestelleChecked = false;
|
||||
bool kadaverChecked = false;
|
||||
bool sichtungChecked = false;
|
||||
bool heulenChecked = false;
|
||||
bool sonstigesChecked = false;
|
||||
|
||||
// for sonstiges textfield
|
||||
TextEditingController sonstigesController = TextEditingController();
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
sonstigesController.addListener(updateController);
|
||||
}
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
sonstigesController.dispose();
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
void updateController() {
|
||||
Map<String, bool> props = {
|
||||
"liegestelle": liegestelleChecked,
|
||||
"kadaver": kadaverChecked,
|
||||
"sichtung": sichtungChecked,
|
||||
"heulen": heulenChecked,
|
||||
"sonstiges": sonstigesChecked
|
||||
};
|
||||
bool firstRun = true;
|
||||
|
||||
widget.hinweise.text = "";
|
||||
|
||||
for (String key in props.keys) {
|
||||
if (!firstRun) {
|
||||
widget.hinweise.text += ";";
|
||||
}
|
||||
if (key == "sonstiges") {
|
||||
widget.hinweise.text += "$key:${sonstigesController.text}";
|
||||
} else {
|
||||
widget.hinweise.text += "$key:${props[key]}";
|
||||
}
|
||||
|
||||
firstRun = false;
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Column(
|
||||
children: [
|
||||
CheckboxListTile(
|
||||
title: Text(AppLocalizations.of(context)!.liegestelle),
|
||||
value: liegestelleChecked,
|
||||
onChanged: (bool? value) {
|
||||
setState(() => liegestelleChecked = value ?? false);
|
||||
updateController();
|
||||
}),
|
||||
CheckboxListTile(
|
||||
title: Text(AppLocalizations.of(context)!.wildtierKadaver),
|
||||
value: kadaverChecked,
|
||||
onChanged: (bool? value) {
|
||||
setState(() => kadaverChecked = value ?? false);
|
||||
updateController();
|
||||
}),
|
||||
CheckboxListTile(
|
||||
title: Text(AppLocalizations.of(context)!.sichtung),
|
||||
value: sichtungChecked,
|
||||
onChanged: (bool? value) {
|
||||
setState(() => sichtungChecked = value ?? false);
|
||||
updateController();
|
||||
}),
|
||||
CheckboxListTile(
|
||||
title: Text(AppLocalizations.of(context)!.heulen),
|
||||
value: heulenChecked,
|
||||
onChanged: (bool? value) {
|
||||
setState(() => heulenChecked = value ?? false);
|
||||
updateController();
|
||||
}),
|
||||
CheckboxListTile(
|
||||
title: Text(AppLocalizations.of(context)!.sonstiges),
|
||||
value: sonstigesChecked,
|
||||
onChanged: (bool? value) {
|
||||
setState(() => sonstigesChecked = value ?? false);
|
||||
updateController();
|
||||
}),
|
||||
if (sonstigesChecked)
|
||||
VarTextField(
|
||||
textController: sonstigesController,
|
||||
localization: AppLocalizations.of(context)!.sonstiges,
|
||||
dbName: "HinweiseSonstiges",
|
||||
required: false,
|
||||
dbDesignation: DatabasesEnum.excursion)
|
||||
],
|
||||
);
|
||||
}
|
||||
}
|
||||
103
lib/screens/excursion/widgets/hund_u_leine.dart
Normal file
103
lib/screens/excursion/widgets/hund_u_leine.dart
Normal file
@@ -0,0 +1,103 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
|
||||
|
||||
class HundULeine extends StatefulWidget {
|
||||
// 1. with dog (ja, bzw name oder nein) 2. with leash
|
||||
// if nothing selected null
|
||||
final Function(String, String) onMHundChanged;
|
||||
|
||||
const HundULeine({super.key, required this.onMHundChanged});
|
||||
|
||||
@override
|
||||
HundULeineState createState() => HundULeineState();
|
||||
}
|
||||
|
||||
class HundULeineState extends State<HundULeine> {
|
||||
String? _selectedMHundValue;
|
||||
String _selectedMLeineValue = "nein";
|
||||
TextEditingController controller = TextEditingController();
|
||||
bool visible = false;
|
||||
|
||||
void onValueChanged(String mHund, String mLeine) {
|
||||
setState(() {
|
||||
visible = mHund == "ja" ? true : false;
|
||||
_selectedMHundValue = mHund;
|
||||
_selectedMLeineValue = mLeine;
|
||||
});
|
||||
|
||||
if (mHund != "nein" && controller.text != "") mHund = controller.text;
|
||||
|
||||
if (mHund == "nein") {
|
||||
_selectedMHundValue = "nein";
|
||||
widget.onMHundChanged(mHund, "nein");
|
||||
} else {
|
||||
widget.onMHundChanged(mHund, mLeine);
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Column(
|
||||
children: [
|
||||
Align(
|
||||
alignment: Alignment.bottomLeft,
|
||||
child: Text(AppLocalizations.of(context)!.mHund)),
|
||||
ListTile(
|
||||
visualDensity: const VisualDensity(vertical: -4),
|
||||
title: Text(AppLocalizations.of(context)!.ja),
|
||||
leading: Radio<String>(
|
||||
value: "ja",
|
||||
groupValue: _selectedMHundValue,
|
||||
onChanged: (value) {
|
||||
onValueChanged(value!, _selectedMLeineValue);
|
||||
},
|
||||
),
|
||||
),
|
||||
ListTile(
|
||||
visualDensity: const VisualDensity(vertical: -4),
|
||||
title: Text(AppLocalizations.of(context)!.nein),
|
||||
leading: Radio<String>(
|
||||
value: "nein",
|
||||
groupValue: _selectedMHundValue,
|
||||
onChanged: (value) {
|
||||
onValueChanged(value!, _selectedMLeineValue);
|
||||
},
|
||||
),
|
||||
),
|
||||
if (visible) ...[
|
||||
TextField(
|
||||
controller: controller,
|
||||
onChanged: (value) {
|
||||
onValueChanged("ja", _selectedMLeineValue);
|
||||
},
|
||||
decoration:
|
||||
InputDecoration(hintText: AppLocalizations.of(context)!.name),
|
||||
),
|
||||
Text(AppLocalizations.of(context)!.mLeine),
|
||||
ListTile(
|
||||
visualDensity: const VisualDensity(vertical: -4),
|
||||
title: Text(AppLocalizations.of(context)!.ja),
|
||||
leading: Radio<String>(
|
||||
value: "ja",
|
||||
groupValue: _selectedMLeineValue,
|
||||
onChanged: (value) {
|
||||
onValueChanged("ja", value!);
|
||||
},
|
||||
),
|
||||
),
|
||||
ListTile(
|
||||
visualDensity: const VisualDensity(vertical: -4),
|
||||
title: Text(AppLocalizations.of(context)!.nein),
|
||||
leading: Radio<String>(
|
||||
value: "nein",
|
||||
groupValue: _selectedMLeineValue,
|
||||
onChanged: (value) {
|
||||
onValueChanged("ja", value!);
|
||||
},
|
||||
),
|
||||
),
|
||||
]
|
||||
],
|
||||
);
|
||||
}
|
||||
}
|
||||
58
lib/screens/excursion/widgets/letzter_niederschlag.dart
Normal file
58
lib/screens/excursion/widgets/letzter_niederschlag.dart
Normal file
@@ -0,0 +1,58 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
|
||||
|
||||
class LetzterNiederschlag extends StatefulWidget {
|
||||
final TextEditingController controller;
|
||||
|
||||
const LetzterNiederschlag({super.key, required this.controller});
|
||||
|
||||
@override
|
||||
LetzterNiederschlagState createState() => LetzterNiederschlagState();
|
||||
}
|
||||
|
||||
class LetzterNiederschlagState extends State<LetzterNiederschlag> {
|
||||
String? selectedValue; // Variable für den ausgewählten Wert
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return DropdownButton<String>(
|
||||
isExpanded: true,
|
||||
value: selectedValue,
|
||||
hint: Text(AppLocalizations.of(context)!.letzterNiederschlag),
|
||||
onChanged: (String? newValue) {
|
||||
setState(() {
|
||||
selectedValue = newValue; // Aktualisiere den ausgewählten Wert
|
||||
});
|
||||
},
|
||||
items: [
|
||||
DropdownMenuItem<String>(
|
||||
value: "aktuell",
|
||||
child: Text(AppLocalizations.of(context)!.aktuell),
|
||||
),
|
||||
DropdownMenuItem<String>(
|
||||
value: "selberMorgen",
|
||||
child: Text(AppLocalizations.of(context)!.selberMorgen),
|
||||
),
|
||||
DropdownMenuItem<String>(
|
||||
value: "nacht",
|
||||
child: Text(AppLocalizations.of(context)!.letzteNacht),
|
||||
),
|
||||
DropdownMenuItem<String>(
|
||||
value: "vortag",
|
||||
child: Text(AppLocalizations.of(context)!.vortag),
|
||||
),
|
||||
DropdownMenuItem<String>(
|
||||
value: "vor23Tagen",
|
||||
child: Text(AppLocalizations.of(context)!.vor23Tagen),
|
||||
),
|
||||
DropdownMenuItem<String>(
|
||||
value: "vor46Tagen",
|
||||
child: Text(AppLocalizations.of(context)!.vor46Tagen),
|
||||
),
|
||||
DropdownMenuItem<String>(
|
||||
value: "vor1Woche",
|
||||
child: Text(AppLocalizations.of(context)!.vor1Woche),
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
}
|
||||
142
lib/screens/excursion/widgets/spur_gefunden.dart
Normal file
142
lib/screens/excursion/widgets/spur_gefunden.dart
Normal file
@@ -0,0 +1,142 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
|
||||
|
||||
class SpurGefunden extends StatefulWidget {
|
||||
final TextEditingController spurFund;
|
||||
final TextEditingController spurLang;
|
||||
final TextEditingController spurTiere;
|
||||
final TextEditingController spSicher;
|
||||
final TextEditingController welpenSp;
|
||||
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});
|
||||
|
||||
@override
|
||||
State<SpurGefunden> createState() => _SpurGefundenState();
|
||||
}
|
||||
|
||||
class _SpurGefundenState extends State<SpurGefunden> {
|
||||
bool _spurFundChecked = false;
|
||||
bool _spSicher = false;
|
||||
bool _wpSicher = false;
|
||||
bool _welpenSp = false;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Column(
|
||||
children: [
|
||||
Row(
|
||||
children: [
|
||||
Text(AppLocalizations.of(context)!.spurGefunden),
|
||||
Checkbox(
|
||||
value: _spurFundChecked,
|
||||
onChanged: (val) {
|
||||
setState(() {
|
||||
_spurFundChecked = val ?? false;
|
||||
widget.spurFund.text = val ?? false ? "Spur" : "";
|
||||
});
|
||||
},
|
||||
),
|
||||
],
|
||||
),
|
||||
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";
|
||||
});
|
||||
}),
|
||||
],
|
||||
),
|
||||
],
|
||||
)),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
}
|
||||
220
lib/screens/excursion/widgets/strecke_u_spurbedingungen.dart
Normal file
220
lib/screens/excursion/widgets/strecke_u_spurbedingungen.dart
Normal file
@@ -0,0 +1,220 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
|
||||
|
||||
class StreckeUSpurbedingungen extends StatefulWidget {
|
||||
final TextEditingController kmAutoController;
|
||||
final TextEditingController kmFussController;
|
||||
final TextEditingController kmRadController;
|
||||
final TextEditingController spGutController;
|
||||
final TextEditingController spMittelController;
|
||||
final TextEditingController spSchlechtController;
|
||||
|
||||
const StreckeUSpurbedingungen(
|
||||
{required this.kmAutoController,
|
||||
required this.kmFussController,
|
||||
required this.kmRadController,
|
||||
required this.spGutController,
|
||||
required this.spMittelController,
|
||||
required this.spSchlechtController,
|
||||
super.key});
|
||||
|
||||
@override
|
||||
StreckeUSpurbedingungenState createState() => StreckeUSpurbedingungenState();
|
||||
}
|
||||
|
||||
class StreckeUSpurbedingungenState extends State<StreckeUSpurbedingungen> {
|
||||
// vars for percent text fields
|
||||
String carPercent = "0";
|
||||
String footPercent = "0";
|
||||
String bikePercent = "0";
|
||||
|
||||
String goodPercent = "0";
|
||||
String middlePercent = "0";
|
||||
String badPercent = "0";
|
||||
|
||||
String totalKm = "0";
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
// Travle Distance
|
||||
widget.kmAutoController.addListener(onDistanceTravledUpdated);
|
||||
widget.kmFussController.addListener(onDistanceTravledUpdated);
|
||||
widget.kmRadController.addListener(onDistanceTravledUpdated);
|
||||
|
||||
widget.kmAutoController.text = "0";
|
||||
widget.kmFussController.text = "0";
|
||||
widget.kmRadController.text = "0";
|
||||
|
||||
// Track Conditions
|
||||
widget.spGutController.addListener(onTrackConditionsUpdated);
|
||||
widget.spMittelController.addListener(onTrackConditionsUpdated);
|
||||
widget.spSchlechtController.addListener(onTrackConditionsUpdated);
|
||||
|
||||
widget.spGutController.text = "0";
|
||||
widget.spMittelController.text = "0";
|
||||
widget.spSchlechtController.text = "0";
|
||||
}
|
||||
|
||||
|
||||
void onDistanceTravledUpdated() {
|
||||
try {
|
||||
double kmAuto = double.parse(widget.kmAutoController.text);
|
||||
double kmFuss = double.parse(widget.kmFussController.text);
|
||||
double kmRad = double.parse(widget.kmRadController.text);
|
||||
double gesKm = (kmAuto + kmFuss + kmRad);
|
||||
|
||||
if (gesKm == 0) {
|
||||
carPercent = "0";
|
||||
footPercent = "0";
|
||||
bikePercent = "0";
|
||||
} else {
|
||||
carPercent = (kmAuto / gesKm * 100).round().toString();
|
||||
footPercent = (kmFuss / gesKm * 100).round().toString();
|
||||
bikePercent = (kmRad / gesKm * 100).round().toString();
|
||||
totalKm = gesKm.toString();
|
||||
}
|
||||
setState(() {});
|
||||
} catch (e) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
void onTrackConditionsUpdated() {
|
||||
try {
|
||||
double kmGood = double.parse(widget.spGutController.text);
|
||||
double kmMiddle = double.parse(widget.spMittelController.text);
|
||||
double kmBad = double.parse(widget.spSchlechtController.text);
|
||||
double gesKm = (kmGood + kmMiddle + kmBad);
|
||||
|
||||
if (gesKm == 0) {
|
||||
goodPercent = "0";
|
||||
middlePercent = "0";
|
||||
badPercent = "0";
|
||||
} else {
|
||||
goodPercent = (kmGood / gesKm * 100).round().toString();
|
||||
middlePercent = (kmMiddle / gesKm * 100).round().toString();
|
||||
badPercent = (kmBad / gesKm * 100).round().toString();
|
||||
}
|
||||
setState(() {});
|
||||
} catch (e) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Column(
|
||||
children: [
|
||||
Align(
|
||||
alignment: Alignment.bottomLeft,
|
||||
child: Text(
|
||||
AppLocalizations.of(context)!.zurueckgelegteStrecke,
|
||||
style: Theme.of(context).textTheme.titleMedium,
|
||||
)),
|
||||
Row(
|
||||
children: [
|
||||
Expanded(child: Text(AppLocalizations.of(context)!.auto)),
|
||||
Expanded(
|
||||
child: TextField(
|
||||
keyboardType: TextInputType.number,
|
||||
controller: widget.kmAutoController,
|
||||
)),
|
||||
Expanded(child: Center(child: Text("="))),
|
||||
Expanded(child: Center(child: Text(carPercent))),
|
||||
Expanded(child: Center(child: Text("%"))),
|
||||
],
|
||||
),
|
||||
Row(
|
||||
children: [
|
||||
Expanded(child: Text(AppLocalizations.of(context)!.zuFuss)),
|
||||
Expanded(
|
||||
child: TextField(
|
||||
keyboardType: TextInputType.number,
|
||||
controller: widget.kmFussController)),
|
||||
Expanded(child: Center(child: Text("="))),
|
||||
Expanded(child: Center(child: Text(footPercent))),
|
||||
Expanded(child: Center(child: Text("%"))),
|
||||
],
|
||||
),
|
||||
Row(
|
||||
children: [
|
||||
Expanded(child: Text(AppLocalizations.of(context)!.fahrrad)),
|
||||
Expanded(
|
||||
child: TextField(
|
||||
keyboardType: TextInputType.number,
|
||||
controller: widget.kmRadController)),
|
||||
Expanded(child: Center(child: Text("="))),
|
||||
Expanded(child: Center(child: Text(bikePercent))),
|
||||
Expanded(child: Center(child: Text("%"))),
|
||||
],
|
||||
),
|
||||
const SizedBox(
|
||||
height: 20,
|
||||
),
|
||||
Row(
|
||||
children: [
|
||||
Expanded(
|
||||
flex: 1,
|
||||
child: Text(AppLocalizations.of(context)!.gesamt),
|
||||
),
|
||||
Expanded(
|
||||
flex: 3,
|
||||
child: Align(
|
||||
alignment: Alignment.bottomLeft,
|
||||
child: Text(totalKm),
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
const SizedBox(
|
||||
height: 20,
|
||||
),
|
||||
Align(
|
||||
alignment: Alignment.bottomLeft,
|
||||
child: Text(
|
||||
AppLocalizations.of(context)!.spurbedingungen,
|
||||
style: Theme.of(context).textTheme.titleMedium,
|
||||
),
|
||||
),
|
||||
Row(
|
||||
children: [
|
||||
Expanded(child: Text(AppLocalizations.of(context)!.gut)),
|
||||
Expanded(
|
||||
child: TextField(
|
||||
keyboardType: TextInputType.number,
|
||||
controller: widget.spGutController)),
|
||||
Expanded(child: Center(child: Text("="))),
|
||||
Expanded(child: Center(child: Text(goodPercent))),
|
||||
Expanded(child: Center(child: Text("%"))),
|
||||
],
|
||||
),
|
||||
Row(
|
||||
children: [
|
||||
Expanded(child: Text(AppLocalizations.of(context)!.mittel)),
|
||||
Expanded(
|
||||
child: TextField(
|
||||
keyboardType: TextInputType.number,
|
||||
controller: widget.spMittelController)),
|
||||
Expanded(child: Center(child: Text("="))),
|
||||
Expanded(child: Center(child: Text(middlePercent))),
|
||||
Expanded(child: Center(child: Text("%"))),
|
||||
],
|
||||
),
|
||||
Row(
|
||||
children: [
|
||||
Expanded(child: Text(AppLocalizations.of(context)!.schlecht)),
|
||||
Expanded(
|
||||
child: TextField(
|
||||
keyboardType: TextInputType.number,
|
||||
controller: widget.spSchlechtController,
|
||||
)),
|
||||
Expanded(child: Center(child: Text("="))),
|
||||
Expanded(child: Center(child: Text(badPercent))),
|
||||
Expanded(child: Center(child: Text("%"))),
|
||||
],
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user