added SpurGefunden widget(s)
This commit is contained in:
@@ -2,6 +2,7 @@ import 'package:animations/animations.dart';
|
||||
import 'package:fforte/screens/Excursion/widgets/bima_nutzer.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';
|
||||
@@ -82,11 +83,12 @@ class _ExcursionMainState extends State<ExcursionMain> {
|
||||
return rmap;
|
||||
}
|
||||
|
||||
int currentStep = 0;
|
||||
int currentStep = 0;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
List<Step> getSteps() => [
|
||||
List<Step> getSteps() =>
|
||||
[
|
||||
Step(
|
||||
title: Text(AppLocalizations.of(context)!.dateandtime),
|
||||
content: Column(
|
||||
@@ -215,14 +217,29 @@ class _ExcursionMainState extends State<ExcursionMain> {
|
||||
const SizedBox(height: 10),
|
||||
LetzterNiederschlag(controller: getTextFields()["RegenVor"]!),
|
||||
const SizedBox(height: 20),
|
||||
StreckeUSpurbedingungen(),
|
||||
|
||||
StreckeUSpurbedingungen(
|
||||
kmAutoController: getTextFields()["KmAuto"]!,
|
||||
kmFussController: getTextFields()["KmFuss"]!,
|
||||
kmRadController: getTextFields()["KmRad"]!,
|
||||
spGutController: getTextFields()["SpGut"]!,
|
||||
spMittelController: getTextFields()["SpMittel"]!,
|
||||
spSchlechtController: getTextFields()["SpSchlecht"]!,
|
||||
),
|
||||
const SizedBox(height: 20,),
|
||||
const Divider(),
|
||||
SpurGefunden(
|
||||
spurFund: getTextFields()["SpurFund"]!,
|
||||
spurLang: getTextFields()["SpurLang"]!,
|
||||
spurTiere: getTextFields()["SpurTiere"]!,
|
||||
spSicher: getTextFields()["SpSicher"]!,
|
||||
welpenSp: getTextFields()["WelpenSp"]!,
|
||||
welpenAnz: getTextFields()["WelpenAnz"]!,
|
||||
wpSicher: getTextFields()["WpSicher"]!)
|
||||
|
||||
],
|
||||
))
|
||||
];
|
||||
|
||||
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
title: Text(AppLocalizations.of(context)!.excursion),
|
||||
@@ -253,10 +270,7 @@ class _ExcursionMainState extends State<ExcursionMain> {
|
||||
if (!isLastStep) {
|
||||
setState(() {
|
||||
currentStep += 1;
|
||||
print(currentStep);
|
||||
});
|
||||
} else {
|
||||
print("help");
|
||||
}
|
||||
},
|
||||
onStepCancel: () {
|
||||
|
||||
141
lib/screens/Excursion/widgets/spur_gefunden.dart
Normal file
141
lib/screens/Excursion/widgets/spur_gefunden.dart
Normal file
@@ -0,0 +1,141 @@
|
||||
import 'package:flutter/material.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: [
|
||||
const Text("Spur gefunden"),
|
||||
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("Gesamtlaenge aller dok. Spuren (m)")),
|
||||
TextField(
|
||||
keyboardType: TextInputType.number,
|
||||
controller: widget.spurLang,
|
||||
),
|
||||
const SizedBox(
|
||||
height: 30,
|
||||
),
|
||||
Align(
|
||||
alignment: Alignment.bottomLeft,
|
||||
child: Text("max. Anzahl zus. gefaerhrterter Tiere")),
|
||||
TextField(
|
||||
keyboardType: TextInputType.number,
|
||||
controller: widget.spurTiere,
|
||||
),
|
||||
Row(
|
||||
children: [
|
||||
const Text("Sicher"),
|
||||
Checkbox(
|
||||
value: _spSicher,
|
||||
onChanged: (val) {
|
||||
setState(() {
|
||||
_spSicher = val ?? false;
|
||||
widget.spSicher.text = _spSicher ? "sicher" : "unsicher";
|
||||
});
|
||||
}),
|
||||
],
|
||||
),
|
||||
const SizedBox(
|
||||
height: 10,
|
||||
),
|
||||
Row(
|
||||
children: [
|
||||
Text("Welpenspur gefunden"),
|
||||
Checkbox(
|
||||
value: _welpenSp,
|
||||
onChanged: (val) {
|
||||
setState(() {
|
||||
_welpenSp = val ?? false;
|
||||
});
|
||||
},
|
||||
),
|
||||
],
|
||||
),
|
||||
Visibility(
|
||||
visible: _welpenSp,
|
||||
child: Column(
|
||||
children: [
|
||||
Align(
|
||||
alignment: Alignment.bottomLeft,
|
||||
child: Text("Gesamtlaenge aller dok. Spuren (m)")),
|
||||
TextField(
|
||||
keyboardType: TextInputType.number,
|
||||
controller: widget.welpenSp,
|
||||
),
|
||||
const SizedBox(height: 20,),
|
||||
Align(
|
||||
alignment: Alignment.bottomLeft,
|
||||
child: Text("max. Anzahl zus. gefaerhrterter Welpen")),
|
||||
TextField(
|
||||
keyboardType: TextInputType.number,
|
||||
controller: widget.welpenAnz,
|
||||
),
|
||||
Row(
|
||||
children: [
|
||||
const Text("Sicher"),
|
||||
Checkbox(
|
||||
value: _wpSicher,
|
||||
onChanged: (val) {
|
||||
setState(() {
|
||||
_wpSicher = val ?? false;
|
||||
widget.spSicher.text =
|
||||
_spSicher ? "sicher" : "unsicher";
|
||||
});
|
||||
}),
|
||||
],
|
||||
),
|
||||
],
|
||||
)),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,21 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class StreckeUSpurbedingungen extends StatefulWidget {
|
||||
const StreckeUSpurbedingungen({super.key});
|
||||
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();
|
||||
@@ -13,14 +27,16 @@ class StreckeUSpurbedingungenState extends State<StreckeUSpurbedingungen> {
|
||||
return Column(
|
||||
children: [
|
||||
Align(
|
||||
alignment: Alignment.bottomLeft,
|
||||
child: Text("Zurueckgelegte Strecke (km)",
|
||||
style: TextStyle(fontSize: 16, decoration: TextDecoration.underline),
|
||||
)),
|
||||
alignment: Alignment.bottomLeft,
|
||||
child: Text(
|
||||
"Zurueckgelegte Strecke (km)",
|
||||
style:
|
||||
TextStyle(fontSize: 16, decoration: TextDecoration.underline),
|
||||
)),
|
||||
Row(
|
||||
children: [
|
||||
Expanded(child: Text("Auto")),
|
||||
Expanded(child: TextField()),
|
||||
Expanded(child: TextField(keyboardType: TextInputType.number, controller: widget.kmAutoController,)),
|
||||
Expanded(child: Center(child: Text("="))),
|
||||
Expanded(child: Center(child: Text(""))),
|
||||
Expanded(child: Center(child: Text("%"))),
|
||||
@@ -29,7 +45,7 @@ class StreckeUSpurbedingungenState extends State<StreckeUSpurbedingungen> {
|
||||
Row(
|
||||
children: [
|
||||
Expanded(child: Text("zu Fuss")),
|
||||
Expanded(child: TextField()),
|
||||
Expanded(child: TextField(keyboardType: TextInputType.number, controller: widget.kmFussController)),
|
||||
Expanded(child: Center(child: Text("="))),
|
||||
Expanded(child: Center(child: Text(""))),
|
||||
Expanded(child: Center(child: Text("%"))),
|
||||
@@ -38,32 +54,45 @@ class StreckeUSpurbedingungenState extends State<StreckeUSpurbedingungen> {
|
||||
Row(
|
||||
children: [
|
||||
Expanded(child: Text("Rad")),
|
||||
Expanded(child: TextField()),
|
||||
Expanded(child: TextField(keyboardType: TextInputType.number, controller: widget.kmRadController)),
|
||||
Expanded(child: Center(child: Text("="))),
|
||||
Expanded(child: Center(child: Text(""))),
|
||||
Expanded(child: Center(child: Text("%"))),
|
||||
],
|
||||
),
|
||||
const SizedBox(height: 20,),
|
||||
const SizedBox(
|
||||
height: 20,
|
||||
),
|
||||
Row(
|
||||
children: [
|
||||
Expanded(flex: 1,child: Text("Gesamt:"),),
|
||||
Expanded(flex: 3,child: Align(alignment: Alignment.bottomLeft, child: Text("data"),),)
|
||||
|
||||
Expanded(
|
||||
flex: 1,
|
||||
child: Text("Gesamt:"),
|
||||
),
|
||||
Expanded(
|
||||
flex: 3,
|
||||
child: Align(
|
||||
alignment: Alignment.bottomLeft,
|
||||
child: Text("data"),
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
|
||||
const SizedBox(height: 20,),
|
||||
const SizedBox(
|
||||
height: 20,
|
||||
),
|
||||
Align(
|
||||
alignment: Alignment.bottomLeft,
|
||||
child: Text("Spurbedingungen (km)",
|
||||
style: TextStyle(fontSize: 16, decoration: TextDecoration.underline),
|
||||
child: Text(
|
||||
"Spurbedingungen (km)",
|
||||
style:
|
||||
TextStyle(fontSize: 16, decoration: TextDecoration.underline),
|
||||
),
|
||||
),
|
||||
Row(
|
||||
children: [
|
||||
Expanded(child: Text("Gut")),
|
||||
Expanded(child: TextField()),
|
||||
Expanded(child: TextField(keyboardType: TextInputType.number, controller: widget.spGutController)),
|
||||
Expanded(child: Center(child: Text("="))),
|
||||
Expanded(child: Center(child: Text(""))),
|
||||
Expanded(child: Center(child: Text("%"))),
|
||||
@@ -72,7 +101,7 @@ class StreckeUSpurbedingungenState extends State<StreckeUSpurbedingungen> {
|
||||
Row(
|
||||
children: [
|
||||
Expanded(child: Text("Mittel")),
|
||||
Expanded(child: TextField()),
|
||||
Expanded(child: TextField(keyboardType: TextInputType.number, controller: widget.spMittelController)),
|
||||
Expanded(child: Center(child: Text("="))),
|
||||
Expanded(child: Center(child: Text(""))),
|
||||
Expanded(child: Center(child: Text("%"))),
|
||||
@@ -81,7 +110,7 @@ class StreckeUSpurbedingungenState extends State<StreckeUSpurbedingungen> {
|
||||
Row(
|
||||
children: [
|
||||
Expanded(child: Text("Schlecht")),
|
||||
Expanded(child: TextField()),
|
||||
Expanded(child: TextField(keyboardType: TextInputType.number, controller: widget.spSchlechtController,)),
|
||||
Expanded(child: Center(child: Text("="))),
|
||||
Expanded(child: Center(child: Text(""))),
|
||||
Expanded(child: Center(child: Text("%"))),
|
||||
|
||||
Reference in New Issue
Block a user