From d6ae86598dd9d031af9fe29680dc050c5bb2946f Mon Sep 17 00:00:00 2001 From: nico Date: Tue, 16 Apr 2024 17:35:55 +0200 Subject: [PATCH] wtf --- Todo.txt | 2 +- lib/addCam/add_cam_main.dart | 6 +++--- lib/addCam/cam_widgets.dart | 39 ++++++++++++++++++++++++++---------- lib/l10n/app_de.arb | 4 +++- lib/l10n/app_en.arb | 10 +++++++++ time.txt | 3 ++- 6 files changed, 47 insertions(+), 17 deletions(-) diff --git a/Todo.txt b/Todo.txt index 0146212..534244d 100644 --- a/Todo.txt +++ b/Todo.txt @@ -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) diff --git a/lib/addCam/add_cam_main.dart b/lib/addCam/add_cam_main.dart index 67c1586..0695ba2 100644 --- a/lib/addCam/add_cam_main.dart +++ b/lib/addCam/add_cam_main.dart @@ -256,8 +256,8 @@ class _AddCamMainState extends State { 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 { 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 { ], )), - // Second step + // Second step Step( title: Text(AppLocalizations.of(context)!.secondstep), content: Column( diff --git a/lib/addCam/cam_widgets.dart b/lib/addCam/cam_widgets.dart index e2ba9aa..9f27d1a 100644 --- a/lib/addCam/cam_widgets.dart +++ b/lib/addCam/cam_widgets.dart @@ -45,8 +45,8 @@ class _CamIdState extends State { 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 { - List markers = [const Marker(point: LatLng(0, 0), child: Icon(Icons.location_on))]; + List 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 { @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 { ], ), 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 createState() => _Adresse1State(); + State createState() => _Adresse1State(); } class _Adresse1State extends State { @@ -551,7 +564,8 @@ class _Adresse2State extends State { if (snapshot.hasData) { return DropdownButton( 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 { ), 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 { builder: (BuildContext context, AsyncSnapshot>> snapshot) { if (snapshot.hasData) { + var filteredData = snapshot.data! + .where((item) => item['Standort'] != null) + .toList(); return DropdownButton( - items: snapshot.data! + items: filteredData .map((item) => buildMenuItem(item['Standort'].toString())) .toList(), @@ -2305,7 +2323,6 @@ class _StandortState extends State { ); } - // KTage1 class KTage1 extends StatefulWidget { diff --git a/lib/l10n/app_de.arb b/lib/l10n/app_de.arb index 3b7fef4..1af68bd 100644 --- a/lib/l10n/app_de.arb +++ b/lib/l10n/app_de.arb @@ -84,5 +84,7 @@ "filelocation": "Ort der zuletzt gespeicherten Datei:", "open": "öffnen", "date": "Datum", - "location": "Standort" + "location": "Standort", + "placedata": "Standortdaten", + "sent": "Gesendet" } \ No newline at end of file diff --git a/lib/l10n/app_en.arb b/lib/l10n/app_en.arb index d0ac05c..d6024e0 100644 --- a/lib/l10n/app_en.arb +++ b/lib/l10n/app_en.arb @@ -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" } } \ No newline at end of file diff --git a/time.txt b/time.txt index 29fcf7f..42028f4 100644 --- a/time.txt +++ b/time.txt @@ -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 \ No newline at end of file +24 mär 1h +17 apr 45 min \ No newline at end of file