luc sitzung

This commit is contained in:
nico
2024-03-20 23:19:07 +01:00
parent d157757893
commit bfabdee84b
12 changed files with 203 additions and 77 deletions

View File

@@ -1,14 +1,10 @@
todo: todo:
TESTEN!!
maybe auch vorschläge aus templates in dropdown menüs anzeigen maybe auch vorschläge aus templates in dropdown menüs anzeigen
eintrag in db wenn http response (in sent column) eintrag in db wenn http response (in sent column)
nachricht wenn einstellungen erfolgreich geändert nachricht wenn einstellungen erfolgreich geändert
view cams übersetzen
abbaudat leer abbaudat leer
datum step redesign (maybe linien dazwischen und sized box zwischen text und button weg)
beim nächsten schritt als template beim nächsten schritt als template
im englischen abändern im englischen abändern
systematic ???
standort automatisch in Karte standort automatisch in Karte
karte drehen aus karte drehen aus
Auftrag absätze machen und textfeld größer wenn langer text Auftrag absätze machen und textfeld größer wenn langer text
@@ -16,11 +12,12 @@ beim letzten weiter alle leeren felder anzeigen (array zurückgeben)
gespeicherten ordner anzeigen gespeicherten ordner anzeigen
zurückfeld in datenansicht zurückfeld in datenansicht
überschriften für view cams überschriften für view cams
Überall wo Kameras steht standorte hinschreiben
null eintrag in dropdown menüs weg null eintrag in dropdown menüs weg
speichern funktion zum Abbrechen speichern funktion zum Abbrechen
fehler beim speichern anzeigen fehler beim speichern anzeigen
ktage raus place variable ein mal deklarieren in add_cam_main
nach koordinaten lkr auswählen (esri-leaflet-geocoder)
nach screenshots sortieren
not to do: not to do:

BIN
assets/images/reconix.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 58 KiB

View File

@@ -11,6 +11,7 @@ import 'package:intl/intl.dart';
import 'package:latlong2/latlong.dart'; import 'package:latlong2/latlong.dart';
import 'package:animations/animations.dart'; import 'package:animations/animations.dart';
import 'package:http/http.dart' as http; import 'package:http/http.dart' as http;
import 'package:dio/dio.dart';
class AddCamMain extends StatefulWidget { class AddCamMain extends StatefulWidget {
final bool isTemplate; final bool isTemplate;
@@ -264,12 +265,38 @@ class _AddCamMainState extends State<AddCamMain> {
'KontSum': kontSumC.text, 'KontSum': kontSumC.text,
}; };
final response = await http.post(Uri.parse("http://192.168.178.30/www.dbb-wolf.de/data/_nicoapi.php"), /* final response = await http.post(
Uri.parse('http://192.168.1.106/www.dbb-wolf.de/data/_app24.php'),
headers: <String, String>{ headers: <String, String>{
'Content-Type': 'application/json; charset=UTF-8', 'Content-Type': 'application/json; charset=UTF-8',
}, },
body: jsonEncode(place)); body: '{"test": "test"}'
print(response); ); */
print(jsonEncode(place));
final dio = Dio();
dio.options.responseType = ResponseType.plain;
Response response =
Response(requestOptions: RequestOptions(path: ''), statusCode: 400);
try {
response = await dio.post(
'http://192.168.1.106/www.dbb-wolf.de/data/_app24.php',
data: jsonEncode(place));
} on DioException catch (e) {
if (e.response?.statusCode == 500) {
print('-------------------------');
print('code 500');
return;
}
}
if (response.statusCode == 201) {
print(response.statusCode);
// TODO Hackal setzen
} else {
print(response.statusCode);
}
} }
Future<void> saveFile() async { Future<void> saveFile() async {
@@ -459,12 +486,16 @@ class _AddCamMainState extends State<AddCamMain> {
title: Text(AppLocalizations.of(context)!.firstStep), title: Text(AppLocalizations.of(context)!.firstStep),
content: Column( content: Column(
children: [ children: [
Align(
alignment: Alignment.bottomLeft,
child: AltStOrt(altStOrtC: altStOrtC),
),
CamId(id: id), CamId(id: id),
Rudel(rudelC: rudelC),
Align( Align(
alignment: Alignment.bottomLeft, alignment: Alignment.bottomLeft,
child: FFTyp(ffTypC: ffTypC), child: FFTyp(ffTypC: ffTypC),
), ),
Rudel(rudelC: rudelC),
const SizedBox( const SizedBox(
height: 15, height: 15,
), ),
@@ -725,10 +756,6 @@ class _AddCamMainState extends State<AddCamMain> {
}); });
}, },
), ),
Align(
alignment: Alignment.bottomLeft,
child: AltStOrt(altStOrtC: altStOrtC),
),
], ],
)), )),
Step( Step(
@@ -783,7 +810,7 @@ class _AddCamMainState extends State<AddCamMain> {
// Here the site is built inclusive the steps from above // Here the site is built inclusive the steps from above
return Scaffold( return Scaffold(
appBar: AppBar(title: Text(AppLocalizations.of(context)!.addCam)), appBar: AppBar(title: Text(AppLocalizations.of(context)!.addplace)),
body: PageTransitionSwitcher( body: PageTransitionSwitcher(
duration: const Duration(milliseconds: 800), duration: const Duration(milliseconds: 800),
transitionBuilder: (Widget child, Animation<double> animation, transitionBuilder: (Widget child, Animation<double> animation,

View File

@@ -23,27 +23,35 @@ class HomePage extends StatelessWidget {
PopupMenuItem( PopupMenuItem(
value: '/settings', value: '/settings',
child: Text(AppLocalizations.of(context)!.settings), child: Text(AppLocalizations.of(context)!.settings),
) ),
PopupMenuItem(
value: '/introScreen',
child: Text(AppLocalizations.of(context)!.showloginscreen))
]) ])
], ],
), ),
body: Center( body: Column(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [ children: [
ElevatedButton( Image.asset('assets/images/reconix.png'),
onPressed: () { Center(
Navigator.push( child: Column(
context, mainAxisAlignment: MainAxisAlignment.center,
MaterialPageRoute( children: [
builder: (context) => const AddCamMain())); ElevatedButton(
}, onPressed: () {
child: Text(AppLocalizations.of(context)!.addCam)), Navigator.push(
ElevatedButton(onPressed: () => Navigator.pushNamed(context, '/viewCams'), context,
child: const Text('view Cams')), MaterialPageRoute(
builder: (context) => const AddCamMain()));
},
child: Text(AppLocalizations.of(context)!.addplace)),
ElevatedButton(onPressed: () => Navigator.pushNamed(context, '/viewCams'),
child: Text(AppLocalizations.of(context)!.viewplaces)),
],
)),
], ],
)), ),
); );
} }
} }

View File

@@ -1,4 +1,5 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter/widgets.dart';
import 'package:shared_preferences/shared_preferences.dart'; import 'package:shared_preferences/shared_preferences.dart';
import 'package:flutter_gen/gen_l10n/app_localizations.dart'; import 'package:flutter_gen/gen_l10n/app_localizations.dart';
@@ -42,13 +43,86 @@ class _IntroScreenState extends State<IntroScreen> {
const SizedBox( const SizedBox(
height: 15, height: 15,
), ),
TextField( Column(
decoration: InputDecoration( children: [
hintText: AppLocalizations.of(context)!.bland), DropdownButton(
controller: bLandC, hint: Text(bLandC.text),
onChanged: (value) => setState(() { items: const [
bLandC.text = value; DropdownMenuItem(
}), value: 'Baden-Württemberg',
child: Text('Baden-Württemberg'),
),
DropdownMenuItem(
value: 'Bayern',
child: Text('Bayern'),
),
DropdownMenuItem(
value: 'Berlin',
child: Text('Berlin'),
),
DropdownMenuItem(
value: 'Brandenburg',
child: Text('Brandenburg'),
),
DropdownMenuItem(
value: 'Bremen',
child: Text('Bremen'),
),
DropdownMenuItem(
value: 'Hamburg',
child: Text('Hamburg'),
),
DropdownMenuItem(
value: 'Hessen',
child: Text('Hessen'),
),
DropdownMenuItem(
value: 'Mecklenburg-Vorpommern',
child: Text('Mecklenburg-Vorpommern'),
),
DropdownMenuItem(
value: 'Niedersachsen',
child: Text('Niedersachsen'),
),
DropdownMenuItem(
value: 'Nordrhein-Westfalen',
child: Text('Nordrhein-Westfalen'),
),
DropdownMenuItem(
value: 'Rheinland-Pfalz',
child: Text('Rheinland-Pfalz'),
),
DropdownMenuItem(
value: 'Saarland',
child: Text('Saarland'),
),
DropdownMenuItem(
value: 'Sachsen',
child: Text('Sachsen'),
),
DropdownMenuItem(
value: 'Sachsen-Anhalt',
child: Text('Sachsen-Anhalt'),
),
DropdownMenuItem(
value: 'Schleswig-Holstein',
child: Text('Schleswig-Holstein'),
),
DropdownMenuItem(
value: 'Thüringen',
child: Text('Thüringen'),
),
],
onChanged: (value) {
setState(() {
bLandC.text = value!;
});
},
),
TextField(
controller: bLandC,
),
],
), ),
const SizedBox( const SizedBox(
height: 15, height: 15,

View File

@@ -1,17 +1,17 @@
{ {
"homePageTitle": "FFOrte", "homePageTitle": "FFOrte",
"addCam": "Kamera hinzufügen", "addplace": "Standort hinzufügen",
"completed": "Vollständig", "completed": "Vollständig",
"uncompleted": "Unvollständig", "uncompleted": "Unvollständig",
"deleteEverything": "Alles löschen?", "deleteEverything": "Alles löschen?",
"deleteEverythingContent": "Alle Kameras werden lokal gelöscht!", "deleteEverythingContent": "Alle Standorte werden lokal gelöscht!",
"camLink": "ID der Kamera", "camLink": "ID der Kamera",
"firstStep": "KAMERA, TERRITORIUM", "firstStep": "STANDORT, KAMERA, TERRITORIUM",
"secondStep": "DATUM, KONTAKT", "secondStep": "DATUM, KONTAKT, ORT",
"date": "DATUM", "date": "DATUM",
"kontakt": "KONTAKT", "kontakt": "KONTAKT",
"status": "Status", "status": "Status",
"viewCamsAppbar": "Kameras ansehen", "viewplacesappbar": "Standorte ansehen",
"locations": "STANDORT", "locations": "STANDORT",
"rudel": "Territorium", "rudel": "Territorium",
"namevorname": "Name", "namevorname": "Name",
@@ -24,8 +24,8 @@
"aktiv": "Aktiv", "aktiv": "Aktiv",
"inaktiv": "Inaktiv", "inaktiv": "Inaktiv",
"opportunistisch": "opportunistisch", "opportunistisch": "opportunistisch",
"systematic": "systematisch", "systematisch": "systematisch",
"fftyp": "Fotofallentyp", "fftyp": "Modell der Kamera",
"foto": "Foto", "foto": "Foto",
"film": "Film", "film": "Film",
"sommerzeit": "Sommerzeit", "sommerzeit": "Sommerzeit",
@@ -50,7 +50,7 @@
"fkontakt2": "FKontakt 2", "fkontakt2": "FKontakt 2",
"fkontakt3": "FKontakt 3", "fkontakt3": "FKontakt 3",
"hofgarten": "Hof/Garten", "hofgarten": "Hof/Garten",
"altstort": "Alter Standort", "altstort": "Standort",
"wiesefeld": "Wiese/Feld/offenfläche", "wiesefeld": "Wiese/Feld/offenfläche",
"ausvon": "Aus von", "ausvon": "Aus von",
"nichts": "---", "nichts": "---",
@@ -58,9 +58,9 @@
"ktage1": "KTage 1", "ktage1": "KTage 1",
"ktage2": "KTage 2", "ktage2": "KTage 2",
"eugrid": "EUGrid", "eugrid": "EUGrid",
"pickDate": "Datum Aufstelung", "pickDate": "Datum Aufstellung",
"pickTime": "Zeit auswählen", "pickTime": "Zeit auswählen",
"delAll": "Alle Kameras löschen", "delAll": "Alle Standorte löschen",
"fieldEmpty": "Folgendes Feld ist leer:", "fieldEmpty": "Folgendes Feld ist leer:",
"cancel": "Abbrechen", "cancel": "Abbrechen",
"template": "Als Vorlage speichern", "template": "Als Vorlage speichern",
@@ -72,12 +72,14 @@
"markerSet": "Marker gesetzt auf", "markerSet": "Marker gesetzt auf",
"kontsum": "Kontrollsumme", "kontsum": "Kontrollsumme",
"bearsafe": "Bearsafe", "bearsafe": "Bearsafe",
"sttyp": "Status", "sttyp": "Wahl des Standortes",
"ort": "Ort", "ort": "Ort",
"continueB": "Weiter", "continueB": "Weiter",
"settings": "Einstellungen", "settings": "Einstellungen",
"changenamestate": "Name und Bundesland ändern", "changenamestate": "Name und Bundesland ändern",
"saveasfile": "Als Datei speichern", "saveasfile": "Als Datei speichern",
"sendtoserver": "Zum Server senden", "sendtoserver": "Zum Server senden",
"savemethod": "Speichermethode auswählen" "savemethod": "Speichermethode auswählen",
"viewplaces": "Standorte anzeigen",
"showloginscreen": "Login-Bildschirm Anzeigen"
} }

View File

@@ -3,23 +3,23 @@
"@homePageTitle": { "@homePageTitle": {
"description": "The title of the homepage" "description": "The title of the homepage"
}, },
"addCam": "add Cam", "addplace": "add Place",
"@addCam": { "@addplace": {
"description": "Button to add a camera" "description": "Button to add a place"
}, },
"completed": "Completed", "completed": "Completed",
"@completed": { "@completed": {
"description": "View cams tab titel" "description": "View place tab titel"
}, },
"uncompleted": "Uncompleted", "uncompleted": "Uncompleted",
"@uncompleted": { "@uncompleted": {
"description": "View cams tab titel" "description": "View place tab titel"
}, },
"deleteEverything": "Delete everything?", "deleteEverything": "Delete everything?",
"@deleteEverything": { "@deleteEverything": {
"description": "Delete everything Alert Dialog title" "description": "Delete everything Alert Dialog title"
}, },
"deleteEverythingContent": "Every camera will deleted locally!", "deleteEverythingContent": "Every place will deleted locally!",
"@deleteEverythingContent": { "@deleteEverythingContent": {
"description": "Delete everything Alert Dialog content" "description": "Delete everything Alert Dialog content"
}, },
@@ -27,7 +27,7 @@
"@camLink": { "@camLink": {
"description": "Camera link textfield" "description": "Camera link textfield"
}, },
"firstStep": "Camera, pack", "firstStep": "PLACE, CAMERA, TERRITORY",
"@firstStep": { "@firstStep": {
"description": "title first step" "description": "title first step"
}, },
@@ -51,9 +51,9 @@
"@secondStep": { "@secondStep": {
"description": "title second step" "description": "title second step"
}, },
"viewCamsAppbar": "View cams", "viewplacesappbar": "View Places",
"@viewCamsAppbar": { "@viewplacesappbar": {
"description": "view cams appbar" "description": "view places appbar"
}, },
"locations": "Location", "locations": "Location",
"@locations": { "@locations": {
@@ -113,11 +113,11 @@
}, },
"systematisch": "systematic", "systematisch": "systematic",
"@systematic": { "@systematisch": {
"description": "systematic radiobutton" "description": "systematic radiobutton"
}, },
"fftyp": "Photo trap type", "fftyp": "Camera model",
"@fftyp": { "@fftyp": {
"description": "FFTyp textfield" "description": "FFTyp textfield"
}, },
@@ -237,7 +237,7 @@
"description": "fkontakt3 textfield" "description": "fkontakt3 textfield"
}, },
"altstort": "AltStOrt", "altstort": "Place",
"@altstort": { "@altstort": {
"description": "altstort textfield" "description": "altstort textfield"
}, },
@@ -299,9 +299,9 @@
"@pickTime": { "@pickTime": {
"description": "Pick time button" "description": "Pick time button"
}, },
"delAll": "Delete all cams", "delAll": "Delete all places",
"@delAll": { "@delAll": {
"description": "Delete all Cams" "description": "Delete all Places"
}, },
"fieldEmpty": "Following Field is empty:", "fieldEmpty": "Following Field is empty:",
"@fieldEmpty": { "@fieldEmpty": {
@@ -345,7 +345,7 @@
"description": "Bearsafe header" "description": "Bearsafe header"
}, },
"sttyp": "STTyp", "sttyp": "Selection of location",
"@sttyp": { "@sttyp": {
"description": "sttyp header" "description": "sttyp header"
}, },
@@ -357,7 +357,7 @@
"ort": "Place", "ort": "Place",
"@ort": { "@ort": {
"description": "View specific cam appbar text" "description": "View specific place appbar text"
}, },
"continueB": "continue", "continueB": "continue",
@@ -377,7 +377,17 @@
"savemethod": "Choose safe method", "savemethod": "Choose safe method",
"@savemethod": { "@savemethod": {
"description": "Title of save mthod popup" "description": "Title of save method popup"
},
"viewplaces": "View Places",
"@viewplaces": {
"description": "View places button"
},
"showloginscreen": "Show login Screen",
"@showloginscreen": {
"description": "show login screen popup menu item"
} }
} }

View File

@@ -106,7 +106,7 @@ class _ViewCamsState extends State<ViewCams> {
text: AppLocalizations.of(context)!.uncompleted, text: AppLocalizations.of(context)!.uncompleted,
) )
]), ]),
title: Text(AppLocalizations.of(context)!.viewCamsAppbar)), title: Text(AppLocalizations.of(context)!.viewplacesappbar)),
body: TabBarView( body: TabBarView(
children: [ children: [
FutureBuilder<List<Map<String, dynamic>>>( FutureBuilder<List<Map<String, dynamic>>>(

View File

@@ -57,6 +57,14 @@ packages:
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "3.0.3" version: "3.0.3"
dio:
dependency: "direct main"
description:
name: dio
sha256: "49af28382aefc53562459104f64d16b9dfd1e8ef68c862d5af436cc8356ce5a8"
url: "https://pub.dev"
source: hosted
version: "5.4.1"
fake_async: fake_async:
dependency: transitive dependency: transitive
description: description:

View File

@@ -47,6 +47,7 @@ dependencies:
flutter_file_dialog: ^3.0.2 flutter_file_dialog: ^3.0.2
file_picker: ^6.2.0 file_picker: ^6.2.0
http: ^1.2.1 http: ^1.2.1
dio: ^5.4.1
dev_dependencies: dev_dependencies:
flutter_lints: ^3.0.1 flutter_lints: ^3.0.1
@@ -63,8 +64,8 @@ flutter:
# the material Icons class. # the material Icons class.
uses-material-design: true uses-material-design: true
# To add assets to your application, add an assets section, like this: # To add assets to your application, add an assets section, like this:
# assets: assets:
# - images/a_dot_burr.jpeg - assets/images/
# - images/a_dot_ham.jpeg # - images/a_dot_ham.jpeg
# An image asset can refer to one or more resolution-specific "variants", see # An image asset can refer to one or more resolution-specific "variants", see
# https://flutter.dev/assets-and-images/#resolution-aware # https://flutter.dev/assets-and-images/#resolution-aware

View File

@@ -39,4 +39,7 @@
2 mär 1h 30 min 2 mär 1h 30 min
7 mär 1h 7 mär 1h
- abgerechnet - - abgerechnet -
16 mär 4h
20 mär 6h 15 min

View File

@@ -1,5 +1 @@
{ {}
"de": [
"systematisch"
]
}