This commit is contained in:
nico
2024-04-16 17:35:55 +02:00
parent cbeedd2b04
commit d6ae86598d
6 changed files with 47 additions and 17 deletions

View File

@@ -1,5 +1,4 @@
todo:
dropdown menü fixen (ai fragen)
fehler beim speichern anzeigen
nach koordinaten lkr auswählen (esri-leaflet-geocoder)
fix ktage und nebeneinander positioniere
@@ -10,6 +9,7 @@ maybe auch vorschläge aus templates in dropdown menüs anzeigen
im englischen abändern
keine ahnung obs funktioniert:
dropdown menü fixen (ai fragen)
eintrg in db wenn http response (in sent column)

View File

@@ -256,8 +256,8 @@ class _AddCamMainState extends State<AddCamMain> {
child: Text(AppLocalizations.of(context)!.template)),
TextButton(
onPressed: () async {
saveFile();
_httpRequest();
saveData();
Navigator.pushNamedAndRemoveUntil(
// ignore: use_build_context_synchronously
context,
@@ -268,7 +268,7 @@ class _AddCamMainState extends State<AddCamMain> {
TextButton(
onPressed: () async {
saveData();
await saveFile();
saveFile();
// ignore: use_build_context_synchronously
Navigator.pushNamedAndRemoveUntil(
// ignore: use_build_context_synchronously
@@ -510,7 +510,7 @@ class _AddCamMainState extends State<AddCamMain> {
],
)),
// Second step
// Second step
Step(
title: Text(AppLocalizations.of(context)!.secondstep),
content: Column(

View File

@@ -45,8 +45,8 @@ class _CamIdState extends State<CamId> {
Expanded(
flex: 2,
child: TextField(
keyboardType: TextInputType.multiline,
maxLines: null,
keyboardType: TextInputType.multiline,
maxLines: null,
decoration: InputDecoration(
hintText: AppLocalizations.of(context)!.camLink,
enabledBorder: widget.id.text.isEmpty
@@ -233,7 +233,9 @@ class Karte extends StatefulWidget {
}
class KarteState extends State<Karte> {
List<Marker> markers = [const Marker(point: LatLng(0, 0), child: Icon(Icons.location_on))];
List<Marker> markers = [
const Marker(point: LatLng(0, 0), child: Icon(Icons.location_on))
];
LatLng? selectedPosition;
Position? updatedPosition;
bool saveVisible = false;
@@ -241,7 +243,15 @@ class KarteState extends State<Karte> {
@override
void initState() {
super.initState();
markers = [Marker(point: LatLng(widget.currentPosition.latitude, widget.currentPosition.longitude), child: const Icon(Icons.location_on, color: Colors.red,))];
markers = [
Marker(
point: LatLng(widget.currentPosition.latitude,
widget.currentPosition.longitude),
child: const Icon(
Icons.location_on,
color: Colors.red,
))
];
}
@override
@@ -283,9 +293,12 @@ class KarteState extends State<Karte> {
],
),
body: FlutterMap(
mapController: MapController(),
mapController: MapController(),
options: MapOptions(
interactionOptions: const InteractionOptions(flags: InteractiveFlag.pinchZoom | InteractiveFlag.drag | InteractiveFlag.pinchMove),
interactionOptions: const InteractionOptions(
flags: InteractiveFlag.pinchZoom |
InteractiveFlag.drag |
InteractiveFlag.pinchMove),
initialCenter: LatLng(widget.currentPosition.latitude,
widget.currentPosition.longitude),
initialZoom: 16.0,
@@ -406,7 +419,7 @@ class Adresse1 extends StatefulWidget {
const Adresse1({super.key, required this.adresse1C});
@override
State<Adresse1> createState() => _Adresse1State();
State<Adresse1> createState() => _Adresse1State();
}
class _Adresse1State extends State<Adresse1> {
@@ -551,7 +564,8 @@ class _Adresse2State extends State<Adresse2> {
if (snapshot.hasData) {
return DropdownButton<String>(
items: snapshot.data!
.map((item) => buildMenuItem(item['Adresse2'].toString()))
.map((item) =>
buildMenuItem(item['Adresse2'].toString()))
.toList(),
onChanged: (value) {
setState(
@@ -1721,7 +1735,8 @@ class _AbbauDatState extends State<AbbauDat> {
),
Builder(builder: (context) {
if (abbauDat != null) {
return Text('${abbauDat?.day}. ${abbauDat?.month}. ${abbauDat?.year}');
return Text(
'${abbauDat?.day}. ${abbauDat?.month}. ${abbauDat?.year}');
} else {
return Text(AppLocalizations.of(context)!.nichts);
}
@@ -2270,8 +2285,11 @@ class _StandortState extends State<Standort> {
builder: (BuildContext context,
AsyncSnapshot<List<Map<String, dynamic>>> snapshot) {
if (snapshot.hasData) {
var filteredData = snapshot.data!
.where((item) => item['Standort'] != null)
.toList();
return DropdownButton<String>(
items: snapshot.data!
items: filteredData
.map((item) =>
buildMenuItem(item['Standort'].toString()))
.toList(),
@@ -2305,7 +2323,6 @@ class _StandortState extends State<Standort> {
);
}
// KTage1
class KTage1 extends StatefulWidget {

View File

@@ -84,5 +84,7 @@
"filelocation": "Ort der zuletzt gespeicherten Datei:",
"open": "öffnen",
"date": "Datum",
"location": "Standort"
"location": "Standort",
"placedata": "Standortdaten",
"sent": "Gesendet"
}

View File

@@ -407,6 +407,16 @@
"location": "Location",
"@location": {
"description": "Location text"
},
"placedata": "Placedata",
"@camdata": {
"description": "view data placedata header"
},
"sent": "Sent",
"@sent": {
"description": "view data sent header"
}
}

View File

@@ -45,4 +45,5 @@
20 mär 6h 15 min
21 mär 4h 15 min
23 mär 2h 15 min
24 mär 1h
24 mär 1h
17 apr 45 min