besprechung
This commit is contained in:
BIN
app-release.apk
BIN
app-release.apk
Binary file not shown.
@@ -68,8 +68,16 @@ class HomePage extends StatelessWidget {
|
|||||||
},
|
},
|
||||||
child: Text(AppLocalizations.of(context)!.addplace),
|
child: Text(AppLocalizations.of(context)!.addplace),
|
||||||
),
|
),
|
||||||
|
ElevatedButton(
|
||||||
const SizedBox(height: 10),
|
style: ElevatedButton.styleFrom(
|
||||||
|
minimumSize: const Size(250, 40),
|
||||||
|
),
|
||||||
|
onPressed: () => Navigator.pushNamed(context, '/viewCams'),
|
||||||
|
child: Text(AppLocalizations.of(context)!.viewplaces),
|
||||||
|
),
|
||||||
|
const SizedBox(height: 20),
|
||||||
|
const Divider(),
|
||||||
|
const SizedBox(height: 20),
|
||||||
ElevatedButton(
|
ElevatedButton(
|
||||||
style: ElevatedButton.styleFrom(
|
style: ElevatedButton.styleFrom(
|
||||||
minimumSize: const Size(250, 40),
|
minimumSize: const Size(250, 40),
|
||||||
@@ -78,14 +86,6 @@ class HomePage extends StatelessWidget {
|
|||||||
child: Text(AppLocalizations.of(context)!.excursion),
|
child: Text(AppLocalizations.of(context)!.excursion),
|
||||||
), // Excursion
|
), // Excursion
|
||||||
|
|
||||||
const SizedBox(height: 10),
|
|
||||||
ElevatedButton(
|
|
||||||
style: ElevatedButton.styleFrom(
|
|
||||||
minimumSize: const Size(250, 40),
|
|
||||||
),
|
|
||||||
onPressed: () => Navigator.pushNamed(context, '/viewCams'),
|
|
||||||
child: Text(AppLocalizations.of(context)!.viewplaces),
|
|
||||||
),
|
|
||||||
const SizedBox(height: 10),
|
const SizedBox(height: 10),
|
||||||
|
|
||||||
ElevatedButton(
|
ElevatedButton(
|
||||||
@@ -96,7 +96,9 @@ class HomePage extends StatelessWidget {
|
|||||||
child: Text(AppLocalizations.of(context)!.viewExcursionen),
|
child: Text(AppLocalizations.of(context)!.viewExcursionen),
|
||||||
),
|
),
|
||||||
|
|
||||||
const SizedBox(height: 10),
|
const SizedBox(height: 20),
|
||||||
|
const Divider(),
|
||||||
|
const SizedBox(height: 20),
|
||||||
ElevatedButton(
|
ElevatedButton(
|
||||||
style: ElevatedButton.styleFrom(
|
style: ElevatedButton.styleFrom(
|
||||||
minimumSize: const Size(250, 40),
|
minimumSize: const Size(250, 40),
|
||||||
|
|||||||
@@ -80,7 +80,8 @@
|
|||||||
"viewplaces": "Standorte anzeigen",
|
"viewplaces": "Standorte anzeigen",
|
||||||
"viewExcursionen": "Exkursionen anzeigen",
|
"viewExcursionen": "Exkursionen anzeigen",
|
||||||
"showloginscreen": "Login-Bildschirm Anzeigen",
|
"showloginscreen": "Login-Bildschirm Anzeigen",
|
||||||
"apiaddress": "Api-Adresse",
|
"ffApiAddress": "Fotofallen Api-Adresse",
|
||||||
|
"exApiAddress": "Exkursions Api-Adresse",
|
||||||
"benutzername": "Benutzername",
|
"benutzername": "Benutzername",
|
||||||
"filelocation": "Ort der zuletzt gespeicherten Datei:",
|
"filelocation": "Ort der zuletzt gespeicherten Datei:",
|
||||||
"open": "öffnen",
|
"open": "öffnen",
|
||||||
@@ -90,6 +91,7 @@
|
|||||||
"pickfile": "Datei auswählen",
|
"pickfile": "Datei auswählen",
|
||||||
"placedata": "Standortdaten",
|
"placedata": "Standortdaten",
|
||||||
"excursionData": "Exkursions daten",
|
"excursionData": "Exkursions daten",
|
||||||
|
"excursion": "Exkursion",
|
||||||
"sent": "Gesendet",
|
"sent": "Gesendet",
|
||||||
"fileSaved": "Datei gespeichtert bei: ",
|
"fileSaved": "Datei gespeichtert bei: ",
|
||||||
"savefilefailed": "Fehler. Bitte nochmal versuchen",
|
"savefilefailed": "Fehler. Bitte nochmal versuchen",
|
||||||
@@ -140,13 +142,14 @@
|
|||||||
"schlecht": "Schlecht",
|
"schlecht": "Schlecht",
|
||||||
"spurGefunden": "Spur gefunden",
|
"spurGefunden": "Spur gefunden",
|
||||||
"gesLaengeAllerDokSpuren": "Gesamte Länge aller dok. Spuren",
|
"gesLaengeAllerDokSpuren": "Gesamte Länge aller dok. Spuren",
|
||||||
"maxAnzahlZusGefaehrdeterTiere": "Max. Anzahl zus. gefährdeter Tiere",
|
"gesLaengeAllerDokWelpenSpuren": "Länge aller dok. Welpenspuren",
|
||||||
|
"maxAnzahlZusGefaehrdeterTiere": "Max. Anz. zus. gefährdeter Tiere",
|
||||||
"sicher": "Sicher",
|
"sicher": "Sicher",
|
||||||
"welpenSpurGefunden": "Welpenspur gefunden",
|
"welpenSpurGefunden": "Welpenspur",
|
||||||
"anzahlLosungen": "Anzahl losungen",
|
"anzahlLosungen": "Anzahl losungen",
|
||||||
"davonEingesammelt": "Davon eingesammelt",
|
"davonEingesammelt": "Davon eingesammelt",
|
||||||
"davonGenetikproben": "Davon Genetikproben",
|
"davonGenetikproben": "Davon Genetikproben",
|
||||||
"anzahlUrinMakierstellen": "Anzahl Urin-/Makierstellen",
|
"anzahlUrinMakierstellen": "Anz. Urin-/Makierstellen",
|
||||||
"anzahlOestrusblut": "Anzahl Oestrusblut",
|
"anzahlOestrusblut": "Anzahl Oestrusblut",
|
||||||
"anzahlHaarproben": "Anzahl Haarproben",
|
"anzahlHaarproben": "Anzahl Haarproben",
|
||||||
"liegestelle": "Liegestelle",
|
"liegestelle": "Liegestelle",
|
||||||
@@ -159,8 +162,14 @@
|
|||||||
"tracking": "Tracking",
|
"tracking": "Tracking",
|
||||||
"couldntDeterminePosition": "Position konnte nicht ermittelt werden",
|
"couldntDeterminePosition": "Position konnte nicht ermittelt werden",
|
||||||
"trackingRunningInBackground": "Die Tracking funktion läuft im Hintergrund",
|
"trackingRunningInBackground": "Die Tracking funktion läuft im Hintergrund",
|
||||||
"needsAlwaysLocation": "Diese app braucht die Standort berechtigung auf immer gesetzt",
|
"needsAlwaysLocation": "Diese app braucht die Standortberechtigung auf \"immer\" gesetzt",
|
||||||
"deleteWholeRouteBody": "Sind Sie sicher, dass die gesamte bisher gegangene Route gelöscht werden soll?",
|
"deleteWholeRouteBody": "Sind Sie sicher, dass die gesamte bisher gegangene Route gelöscht werden soll?",
|
||||||
"oder": "oder",
|
"oder": "oder",
|
||||||
"bedingungenGroesserAlsStrecke": "Summe der Spurbedingungen ist größer als die der zurueckgelegten Strecke"
|
"bedingungenGroesserAlsStrecke": "Summe der Spurbedingungen ist größer als die der zurueckgelegten Strecke",
|
||||||
|
"einstellungenOeffnen": "Einstellungen öffnen",
|
||||||
|
"erfolgreich": "Erfolgreich",
|
||||||
|
"trackingAnAusschalten": "Tracking an/aus-schalten",
|
||||||
|
"trackingStart": "Tracking starten",
|
||||||
|
"trackingStop": "Tracking stoppen",
|
||||||
|
"trackingPause": "Tracking pausieren"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -385,10 +385,8 @@
|
|||||||
"description": "show login screen popup menu item"
|
"description": "show login screen popup menu item"
|
||||||
},
|
},
|
||||||
|
|
||||||
"apiaddress": "Api-address",
|
"ffApiAddress": "Traps api-adress",
|
||||||
"@apiaddress": {
|
"exApiAddress": "Excursions api-adress",
|
||||||
"description": "api address hint"
|
|
||||||
},
|
|
||||||
|
|
||||||
"benutzername": "Username",
|
"benutzername": "Username",
|
||||||
"@benutzername": {
|
"@benutzername": {
|
||||||
@@ -627,11 +625,13 @@
|
|||||||
|
|
||||||
"gesLaengeAllerDokSpuren": "Total length of documented tracks",
|
"gesLaengeAllerDokSpuren": "Total length of documented tracks",
|
||||||
|
|
||||||
|
"gesLaengeAllerDokWelpenSpuren": "Gesamte Länge aller dok. Spuren",
|
||||||
|
|
||||||
"maxAnzahlZusGefaehrdeterTiere": "Max count of additonal dangered animals",
|
"maxAnzahlZusGefaehrdeterTiere": "Max count of additonal dangered animals",
|
||||||
|
|
||||||
"sicher": "Certain",
|
"sicher": "Certain",
|
||||||
|
|
||||||
"welpenSpurGefunden": "Puppy track Found",
|
"welpenSpurGefunden": "Puppy track",
|
||||||
|
|
||||||
"anzahlLosungen": "Losung count",
|
"anzahlLosungen": "Losung count",
|
||||||
|
|
||||||
@@ -671,5 +671,15 @@
|
|||||||
|
|
||||||
"oder": "or",
|
"oder": "or",
|
||||||
|
|
||||||
"bedingungenGroesserAlsStrecke": "Sum of the track conditions is bigger then sum of the distance traveled"
|
"bedingungenGroesserAlsStrecke": "Sum of the track conditions is bigger then sum of the distance traveled",
|
||||||
|
|
||||||
|
"erfolgreich": "Successful",
|
||||||
|
|
||||||
|
"trackingAnAusschalten": "Turn tracking on/off",
|
||||||
|
|
||||||
|
"trackingStart": "Start tracking",
|
||||||
|
|
||||||
|
"trackingStop": "Stop tracking",
|
||||||
|
|
||||||
|
"trackingPause": "Pause Tracking"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -581,11 +581,17 @@ abstract class AppLocalizations {
|
|||||||
/// **'Show login Screen'**
|
/// **'Show login Screen'**
|
||||||
String get showloginscreen;
|
String get showloginscreen;
|
||||||
|
|
||||||
/// api address hint
|
/// No description provided for @ffApiAddress.
|
||||||
///
|
///
|
||||||
/// In en, this message translates to:
|
/// In en, this message translates to:
|
||||||
/// **'Api-address'**
|
/// **'Traps api-adress'**
|
||||||
String get apiaddress;
|
String get ffApiAddress;
|
||||||
|
|
||||||
|
/// No description provided for @exApiAddress.
|
||||||
|
///
|
||||||
|
/// In en, this message translates to:
|
||||||
|
/// **'Excursions api-adress'**
|
||||||
|
String get exApiAddress;
|
||||||
|
|
||||||
/// intro screen benutzername hint
|
/// intro screen benutzername hint
|
||||||
///
|
///
|
||||||
@@ -947,6 +953,12 @@ abstract class AppLocalizations {
|
|||||||
/// **'Total length of documented tracks'**
|
/// **'Total length of documented tracks'**
|
||||||
String get gesLaengeAllerDokSpuren;
|
String get gesLaengeAllerDokSpuren;
|
||||||
|
|
||||||
|
/// No description provided for @gesLaengeAllerDokWelpenSpuren.
|
||||||
|
///
|
||||||
|
/// In en, this message translates to:
|
||||||
|
/// **'Gesamte Länge aller dok. Spuren'**
|
||||||
|
String get gesLaengeAllerDokWelpenSpuren;
|
||||||
|
|
||||||
/// No description provided for @maxAnzahlZusGefaehrdeterTiere.
|
/// No description provided for @maxAnzahlZusGefaehrdeterTiere.
|
||||||
///
|
///
|
||||||
/// In en, this message translates to:
|
/// In en, this message translates to:
|
||||||
@@ -962,7 +974,7 @@ abstract class AppLocalizations {
|
|||||||
/// No description provided for @welpenSpurGefunden.
|
/// No description provided for @welpenSpurGefunden.
|
||||||
///
|
///
|
||||||
/// In en, this message translates to:
|
/// In en, this message translates to:
|
||||||
/// **'Puppy track Found'**
|
/// **'Puppy track'**
|
||||||
String get welpenSpurGefunden;
|
String get welpenSpurGefunden;
|
||||||
|
|
||||||
/// No description provided for @anzahlLosungen.
|
/// No description provided for @anzahlLosungen.
|
||||||
@@ -1084,6 +1096,36 @@ abstract class AppLocalizations {
|
|||||||
/// In en, this message translates to:
|
/// In en, this message translates to:
|
||||||
/// **'Sum of the track conditions is bigger then sum of the distance traveled'**
|
/// **'Sum of the track conditions is bigger then sum of the distance traveled'**
|
||||||
String get bedingungenGroesserAlsStrecke;
|
String get bedingungenGroesserAlsStrecke;
|
||||||
|
|
||||||
|
/// No description provided for @erfolgreich.
|
||||||
|
///
|
||||||
|
/// In en, this message translates to:
|
||||||
|
/// **'Successful'**
|
||||||
|
String get erfolgreich;
|
||||||
|
|
||||||
|
/// No description provided for @trackingAnAusschalten.
|
||||||
|
///
|
||||||
|
/// In en, this message translates to:
|
||||||
|
/// **'Turn tracking on/off'**
|
||||||
|
String get trackingAnAusschalten;
|
||||||
|
|
||||||
|
/// No description provided for @trackingStart.
|
||||||
|
///
|
||||||
|
/// In en, this message translates to:
|
||||||
|
/// **'Start tracking'**
|
||||||
|
String get trackingStart;
|
||||||
|
|
||||||
|
/// No description provided for @trackingStop.
|
||||||
|
///
|
||||||
|
/// In en, this message translates to:
|
||||||
|
/// **'Stop tracking'**
|
||||||
|
String get trackingStop;
|
||||||
|
|
||||||
|
/// No description provided for @trackingPause.
|
||||||
|
///
|
||||||
|
/// In en, this message translates to:
|
||||||
|
/// **'Pause Tracking'**
|
||||||
|
String get trackingPause;
|
||||||
}
|
}
|
||||||
|
|
||||||
class _AppLocalizationsDelegate extends LocalizationsDelegate<AppLocalizations> {
|
class _AppLocalizationsDelegate extends LocalizationsDelegate<AppLocalizations> {
|
||||||
|
|||||||
@@ -252,7 +252,10 @@ class AppLocalizationsDe extends AppLocalizations {
|
|||||||
String get showloginscreen => 'Login-Bildschirm Anzeigen';
|
String get showloginscreen => 'Login-Bildschirm Anzeigen';
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String get apiaddress => 'Api-Adresse';
|
String get ffApiAddress => 'Fotofallen Api-Adresse';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get exApiAddress => 'Exkursions Api-Adresse';
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String get benutzername => 'Benutzername';
|
String get benutzername => 'Benutzername';
|
||||||
@@ -324,7 +327,7 @@ class AppLocalizationsDe extends AppLocalizations {
|
|||||||
String get notest => 'Kein Test';
|
String get notest => 'Kein Test';
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String get excursion => 'Excursion';
|
String get excursion => 'Exkursion';
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String get dateandtime => 'Datum und Zeit';
|
String get dateandtime => 'Datum und Zeit';
|
||||||
@@ -435,13 +438,16 @@ class AppLocalizationsDe extends AppLocalizations {
|
|||||||
String get gesLaengeAllerDokSpuren => 'Gesamte Länge aller dok. Spuren';
|
String get gesLaengeAllerDokSpuren => 'Gesamte Länge aller dok. Spuren';
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String get maxAnzahlZusGefaehrdeterTiere => 'Max. Anzahl zus. gefährdeter Tiere';
|
String get gesLaengeAllerDokWelpenSpuren => 'Länge aller dok. Welpenspuren';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get maxAnzahlZusGefaehrdeterTiere => 'Max. Anz. zus. gefährdeter Tiere';
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String get sicher => 'Sicher';
|
String get sicher => 'Sicher';
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String get welpenSpurGefunden => 'Welpenspur gefunden';
|
String get welpenSpurGefunden => 'Welpenspur';
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String get anzahlLosungen => 'Anzahl losungen';
|
String get anzahlLosungen => 'Anzahl losungen';
|
||||||
@@ -453,7 +459,7 @@ class AppLocalizationsDe extends AppLocalizations {
|
|||||||
String get davonGenetikproben => 'Davon Genetikproben';
|
String get davonGenetikproben => 'Davon Genetikproben';
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String get anzahlUrinMakierstellen => 'Anzahl Urin-/Makierstellen';
|
String get anzahlUrinMakierstellen => 'Anz. Urin-/Makierstellen';
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String get anzahlOestrusblut => 'Anzahl Oestrusblut';
|
String get anzahlOestrusblut => 'Anzahl Oestrusblut';
|
||||||
@@ -492,7 +498,7 @@ class AppLocalizationsDe extends AppLocalizations {
|
|||||||
String get trackingRunningInBackground => 'Die Tracking funktion läuft im Hintergrund';
|
String get trackingRunningInBackground => 'Die Tracking funktion läuft im Hintergrund';
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String get needsAlwaysLocation => 'Diese app braucht die Standort berechtigung auf immer gesetzt';
|
String get needsAlwaysLocation => 'Diese app braucht die Standortberechtigung auf \"immer\" gesetzt';
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String get deleteWholeRouteBody => 'Sind Sie sicher, dass die gesamte bisher gegangene Route gelöscht werden soll?';
|
String get deleteWholeRouteBody => 'Sind Sie sicher, dass die gesamte bisher gegangene Route gelöscht werden soll?';
|
||||||
@@ -502,4 +508,19 @@ class AppLocalizationsDe extends AppLocalizations {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
String get bedingungenGroesserAlsStrecke => 'Summe der Spurbedingungen ist größer als die der zurueckgelegten Strecke';
|
String get bedingungenGroesserAlsStrecke => 'Summe der Spurbedingungen ist größer als die der zurueckgelegten Strecke';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get erfolgreich => 'Erfolgreich';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get trackingAnAusschalten => 'Tracking an/aus-schalten';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get trackingStart => 'Tracking starten';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get trackingStop => 'Tracking stoppen';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get trackingPause => 'Tracking pausieren';
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -252,7 +252,10 @@ class AppLocalizationsEn extends AppLocalizations {
|
|||||||
String get showloginscreen => 'Show login Screen';
|
String get showloginscreen => 'Show login Screen';
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String get apiaddress => 'Api-address';
|
String get ffApiAddress => 'Traps api-adress';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get exApiAddress => 'Excursions api-adress';
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String get benutzername => 'Username';
|
String get benutzername => 'Username';
|
||||||
@@ -434,6 +437,9 @@ class AppLocalizationsEn extends AppLocalizations {
|
|||||||
@override
|
@override
|
||||||
String get gesLaengeAllerDokSpuren => 'Total length of documented tracks';
|
String get gesLaengeAllerDokSpuren => 'Total length of documented tracks';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get gesLaengeAllerDokWelpenSpuren => 'Gesamte Länge aller dok. Spuren';
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String get maxAnzahlZusGefaehrdeterTiere => 'Max count of additonal dangered animals';
|
String get maxAnzahlZusGefaehrdeterTiere => 'Max count of additonal dangered animals';
|
||||||
|
|
||||||
@@ -441,7 +447,7 @@ class AppLocalizationsEn extends AppLocalizations {
|
|||||||
String get sicher => 'Certain';
|
String get sicher => 'Certain';
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String get welpenSpurGefunden => 'Puppy track Found';
|
String get welpenSpurGefunden => 'Puppy track';
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String get anzahlLosungen => 'Losung count';
|
String get anzahlLosungen => 'Losung count';
|
||||||
@@ -502,4 +508,19 @@ class AppLocalizationsEn extends AppLocalizations {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
String get bedingungenGroesserAlsStrecke => 'Sum of the track conditions is bigger then sum of the distance traveled';
|
String get bedingungenGroesserAlsStrecke => 'Sum of the track conditions is bigger then sum of the distance traveled';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get erfolgreich => 'Successful';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get trackingAnAusschalten => 'Turn tracking on/off';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get trackingStart => 'Start tracking';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get trackingStop => 'Stop tracking';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get trackingPause => 'Pause Tracking';
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -20,8 +20,8 @@ void main() async {
|
|||||||
bool isFirstLaunch = prefs.getBool('isFirstLaunch') ?? true;
|
bool isFirstLaunch = prefs.getBool('isFirstLaunch') ?? true;
|
||||||
await prefs.setString('kTage1', "28");
|
await prefs.setString('kTage1', "28");
|
||||||
await prefs.setString('kTage2', "48");
|
await prefs.setString('kTage2', "48");
|
||||||
await prefs.setString(
|
await prefs.setString('fotofallenApiAddress', 'http://192.168.1.170/www.dbb-wolf.de/data/app24.php');
|
||||||
'apiAddress', 'http://192.168.1.106/www.dbb-wolf.de/data/app24.php');
|
await prefs.setString('exkursionenApiAddress', 'http://192.168.1.170/www.dbb-wolf.de/data/api_exkursion.php');
|
||||||
runApp(MyApp(isFirstLaunch: isFirstLaunch));
|
runApp(MyApp(isFirstLaunch: isFirstLaunch));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -147,16 +147,19 @@ class _ExcursionMainState extends State<ExcursionMain> {
|
|||||||
return currentPosition;
|
return currentPosition;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
if (widget.existingData?.isNotEmpty ?? false) {
|
if (widget.existingData?.isNotEmpty ?? false) {
|
||||||
for (var key in widget.existingData!.keys) {
|
for (var key in widget.existingData!.keys) {
|
||||||
rmap[key]!["controller"]!.text =
|
rmap[key]!["controller"]!.text =
|
||||||
widget.existingData?[key].toString() ?? "";
|
widget.existingData?[key].toString() ?? "";
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// Set BLand if there is no existing data
|
// Set BLand and default values if there is no existing data
|
||||||
SharedPreferences.getInstance().then((prefs) {
|
SharedPreferences.getInstance().then((prefs) {
|
||||||
rmap["BLand"]!["controller"]!.text = prefs.getString('bLand') ?? "";
|
rmap["BLand"]!["controller"]!.text = prefs.getString('bLand') ?? "";
|
||||||
});
|
});
|
||||||
|
|
||||||
|
rmap["Datum"]!["controller"]!.text = DateTime.now().toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
isTemplate = widget.isTemplate;
|
isTemplate = widget.isTemplate;
|
||||||
@@ -343,7 +346,7 @@ class _ExcursionMainState extends State<ExcursionMain> {
|
|||||||
},
|
},
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
child: Text(AppLocalizations.of(context)!.tracking),
|
child: Text(AppLocalizations.of(context)!.trackingAnAusschalten),
|
||||||
),
|
),
|
||||||
const SizedBox(height: 10),
|
const SizedBox(height: 10),
|
||||||
|
|
||||||
@@ -382,12 +385,12 @@ class _ExcursionMainState extends State<ExcursionMain> {
|
|||||||
// ---------- Track found
|
// ---------- Track found
|
||||||
SpurGefunden(
|
SpurGefunden(
|
||||||
spurFund: rmap["SpurFund"]!["controller"]!,
|
spurFund: rmap["SpurFund"]!["controller"]!,
|
||||||
// spurLang: rmap["SpurLang"]!["controller"]!,
|
spurLang: rmap["SpurLang"]!["controller"]!,
|
||||||
// spurTiere: rmap["SpurTiere"]!["controller"]!,
|
spurTiere: rmap["SpurTiere"]!["controller"]!,
|
||||||
// spSicher: rmap["SpSicher"]!["controller"]!,
|
spSicher: rmap["SpSicher"]!["controller"]!,
|
||||||
welpenSp: rmap["WelpenSp"]!["controller"]!,
|
welpenSp: rmap["WelpenSp"]!["controller"]!,
|
||||||
// welpenAnz: rmap["WelpenAnz"]!["controller"]!,
|
welpenAnz: rmap["WelpenAnz"]!["controller"]!,
|
||||||
// wpSicher: rmap["WpSicher"]!["controller"]!,
|
wpSicher: rmap["WpSicher"]!["controller"]!,
|
||||||
),
|
),
|
||||||
const Divider(),
|
const Divider(),
|
||||||
const SizedBox(height: 20),
|
const SizedBox(height: 20),
|
||||||
@@ -505,13 +508,14 @@ class _ExcursionMainState extends State<ExcursionMain> {
|
|||||||
DatabasesEnum.excursion,
|
DatabasesEnum.excursion,
|
||||||
);
|
);
|
||||||
return;
|
return;
|
||||||
} else if (!empty) {
|
} else {
|
||||||
await AddEntriesDialogHelper.showSaveOptionsDialog(
|
bool pop = await AddEntriesDialogHelper.showSaveOptionsDialog(
|
||||||
context,
|
context,
|
||||||
getFieldsText(),
|
getFieldsText(),
|
||||||
widget.isTemplate,
|
widget.isTemplate,
|
||||||
DatabasesEnum.excursion,
|
DatabasesEnum.excursion,
|
||||||
);
|
);
|
||||||
|
if (pop && context.mounted) Navigator.of(context).pop();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -63,7 +63,7 @@ class _StatusState extends State<BimaNutzer> {
|
|||||||
visualDensity: const VisualDensity(vertical: -4),
|
visualDensity: const VisualDensity(vertical: -4),
|
||||||
title: Text(AppLocalizations.of(context)!.nneBund),
|
title: Text(AppLocalizations.of(context)!.nneBund),
|
||||||
leading: Radio<String>(
|
leading: Radio<String>(
|
||||||
value: 'NNE-Bund',
|
value: 'NNE Bund',
|
||||||
groupValue: _selectedStatus,
|
groupValue: _selectedStatus,
|
||||||
onChanged: (value) {
|
onChanged: (value) {
|
||||||
setState(() {
|
setState(() {
|
||||||
|
|||||||
@@ -66,6 +66,8 @@ class _HinweiseState extends State<Hinweise> {
|
|||||||
for (String key in props.keys) {
|
for (String key in props.keys) {
|
||||||
if (!firstRun && props[key]!) {
|
if (!firstRun && props[key]!) {
|
||||||
widget.hinweise.text += ",";
|
widget.hinweise.text += ",";
|
||||||
|
} else if (firstRun && props[key]!) {
|
||||||
|
firstRun = false;
|
||||||
}
|
}
|
||||||
if (key == "sonstiges") {
|
if (key == "sonstiges") {
|
||||||
widget.hinweise.text += sonstigesController.text;
|
widget.hinweise.text += sonstigesController.text;
|
||||||
@@ -73,7 +75,6 @@ class _HinweiseState extends State<Hinweise> {
|
|||||||
widget.hinweise.text += key;
|
widget.hinweise.text += key;
|
||||||
}
|
}
|
||||||
|
|
||||||
firstRun = false;
|
|
||||||
}
|
}
|
||||||
debugPrint(widget.hinweise.text);
|
debugPrint(widget.hinweise.text);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -24,6 +24,7 @@ class HundULeineState extends State<HundULeine> {
|
|||||||
_selectedMHundValue = "nein";
|
_selectedMHundValue = "nein";
|
||||||
} else {
|
} else {
|
||||||
_selectedMHundValue = widget.mHund.text;
|
_selectedMHundValue = widget.mHund.text;
|
||||||
|
visible = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (widget.mLeine.text == "") {
|
if (widget.mLeine.text == "") {
|
||||||
|
|||||||
@@ -3,23 +3,23 @@ import 'package:fforte/l10n/app_localizations.dart';
|
|||||||
|
|
||||||
class SpurGefunden extends StatefulWidget {
|
class SpurGefunden extends StatefulWidget {
|
||||||
final TextEditingController spurFund;
|
final TextEditingController spurFund;
|
||||||
// final TextEditingController spurLang;
|
final TextEditingController spurLang;
|
||||||
// final TextEditingController spurTiere;
|
final TextEditingController spurTiere;
|
||||||
// final TextEditingController spSicher;
|
final TextEditingController spSicher;
|
||||||
final TextEditingController welpenSp;
|
final TextEditingController welpenSp;
|
||||||
// final TextEditingController welpenAnz;
|
final TextEditingController welpenAnz;
|
||||||
// final TextEditingController wpSicher;
|
final TextEditingController wpSicher;
|
||||||
|
|
||||||
const SpurGefunden(
|
const SpurGefunden({
|
||||||
{super.key,
|
super.key,
|
||||||
required this.spurFund,
|
required this.spurFund,
|
||||||
// required this.spurLang,
|
required this.spurLang,
|
||||||
// required this.spurTiere,
|
required this.spurTiere,
|
||||||
// required this.spSicher,
|
required this.spSicher,
|
||||||
required this.welpenSp,
|
required this.welpenSp,
|
||||||
// required this.welpenAnz,
|
required this.welpenAnz,
|
||||||
// required this.wpSicher,
|
required this.wpSicher,
|
||||||
});
|
});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
State<SpurGefunden> createState() => _SpurGefundenState();
|
State<SpurGefunden> createState() => _SpurGefundenState();
|
||||||
@@ -27,21 +27,27 @@ class SpurGefunden extends StatefulWidget {
|
|||||||
|
|
||||||
class _SpurGefundenState extends State<SpurGefunden> {
|
class _SpurGefundenState extends State<SpurGefunden> {
|
||||||
late bool _spurFundChecked;
|
late bool _spurFundChecked;
|
||||||
// bool _spSicher = false;
|
bool _spSicher = false;
|
||||||
// bool _wpSicher = false;
|
bool _wpSicher = false;
|
||||||
late bool _welpenSpFundChecked;
|
late bool _welpenSpFundChecked;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
if (widget.spurFund.text == "") {
|
if (widget.spurFund.text == "") {
|
||||||
_spurFundChecked = false;
|
_spurFundChecked = false;
|
||||||
_welpenSpFundChecked = false;
|
_welpenSpFundChecked = false;
|
||||||
} else {
|
} else {
|
||||||
_spurFundChecked = true;
|
_spurFundChecked = true;
|
||||||
_welpenSpFundChecked = true;
|
_welpenSpFundChecked = true;
|
||||||
|
if (widget.wpSicher.text != "") {
|
||||||
|
_wpSicher = true;
|
||||||
|
}
|
||||||
|
if (widget.spSicher.text != "") {
|
||||||
|
_spSicher = true;
|
||||||
}
|
}
|
||||||
super.initState();
|
|
||||||
}
|
}
|
||||||
|
super.initState();
|
||||||
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
@@ -59,106 +65,166 @@ class _SpurGefundenState extends State<SpurGefunden> {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
Text(AppLocalizations.of(context)!.welpenSpurGefunden),
|
// Text(AppLocalizations.of(context)!.welpenSpurGefunden),
|
||||||
Checkbox(
|
// Checkbox(
|
||||||
value: _welpenSpFundChecked,
|
// value: _welpenSpFundChecked,
|
||||||
onChanged: (val) {
|
// onChanged: (val) {
|
||||||
setState(() {
|
// setState(() {
|
||||||
_welpenSpFundChecked = val ?? false;
|
// _welpenSpFundChecked = val ?? false;
|
||||||
widget.welpenSp.text = val ?? false ? "WelpenSp" : "";
|
// widget.welpenSp.text = val ?? false ? "WelpenSp" : "";
|
||||||
});
|
// });
|
||||||
},
|
// },
|
||||||
),
|
// ),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
// Visibility(
|
Visibility(
|
||||||
// visible: _spurFundChecked,
|
visible: _spurFundChecked,
|
||||||
// child: Column(
|
child: Column(
|
||||||
// children: [
|
children: [
|
||||||
// Align(
|
Row(
|
||||||
// alignment: Alignment.bottomLeft,
|
children: [
|
||||||
// child: Text(AppLocalizations.of(context)!.gesLaengeAllerDokSpuren)),
|
Expanded(
|
||||||
// TextField(
|
flex: 7,
|
||||||
// keyboardType: TextInputType.number,
|
child: Align(
|
||||||
// controller: widget.spurLang,
|
alignment: Alignment.bottomLeft,
|
||||||
// ),
|
child: Text(
|
||||||
// const SizedBox(
|
AppLocalizations.of(context)!.gesLaengeAllerDokSpuren,
|
||||||
// height: 30,
|
),
|
||||||
// ),
|
),
|
||||||
// Align(
|
),
|
||||||
// alignment: Alignment.bottomLeft,
|
Expanded(
|
||||||
// child: Text(AppLocalizations.of(context)!.maxAnzahlZusGefaehrdeterTiere)),
|
flex: 2,
|
||||||
// TextField(
|
child: TextField(
|
||||||
// keyboardType: TextInputType.number,
|
keyboardType: TextInputType.number,
|
||||||
// controller: widget.spurTiere,
|
controller: widget.spurLang,
|
||||||
// ),
|
),
|
||||||
// Row(
|
),
|
||||||
// children: [
|
],
|
||||||
// Text(AppLocalizations.of(context)!.sicher),
|
),
|
||||||
// Checkbox(
|
// const SizedBox(height: 10),
|
||||||
// value: _spSicher,
|
Row(
|
||||||
// onChanged: (val) {
|
children: [
|
||||||
// setState(() {
|
Expanded(
|
||||||
// _spSicher = val ?? false;
|
flex: 7,
|
||||||
// widget.spSicher.text = _spSicher ? "sicher" : "unsicher";
|
child: Align(
|
||||||
// });
|
alignment: Alignment.bottomLeft,
|
||||||
// }),
|
child: Text(
|
||||||
// ],
|
AppLocalizations.of(
|
||||||
// ),
|
context,
|
||||||
// const SizedBox(
|
)!.maxAnzahlZusGefaehrdeterTiere,
|
||||||
// height: 10,
|
),
|
||||||
// ),
|
),
|
||||||
// Row(
|
),
|
||||||
// children: [
|
Expanded(
|
||||||
// Text(AppLocalizations.of(context)!.welpenSpurGefunden),
|
flex: 2,
|
||||||
// Checkbox(
|
child: TextField(
|
||||||
// value: _welpenSp,
|
keyboardType: TextInputType.number,
|
||||||
// onChanged: (val) {
|
controller: widget.spurTiere,
|
||||||
// setState(() {
|
),
|
||||||
// _welpenSp = val ?? false;
|
),
|
||||||
// });
|
],
|
||||||
// },
|
),
|
||||||
// ),
|
Row(
|
||||||
// ],
|
children: [
|
||||||
// ),
|
Text(AppLocalizations.of(context)!.sicher),
|
||||||
// Visibility(
|
Checkbox(
|
||||||
// visible: _welpenSp,
|
value: _spSicher,
|
||||||
// child: Column(
|
onChanged: (val) {
|
||||||
// children: [
|
setState(() {
|
||||||
// Align(
|
_spSicher = val ?? false;
|
||||||
// alignment: Alignment.bottomLeft,
|
widget.spSicher.text =
|
||||||
// child: Text(AppLocalizations.of(context)!.gesLaengeAllerDokSpuren)),
|
_spSicher ? "sicher" : "unsicher";
|
||||||
// TextField(
|
});
|
||||||
// keyboardType: TextInputType.number,
|
},
|
||||||
// controller: widget.welpenSp,
|
),
|
||||||
// ),
|
],
|
||||||
// const SizedBox(height: 20,),
|
),
|
||||||
// Align(
|
// const SizedBox(height: 10),
|
||||||
// alignment: Alignment.bottomLeft,
|
Row(
|
||||||
// child: Text(AppLocalizations.of(context)!.maxAnzahlZusGefaehrdeterTiere)),
|
children: [
|
||||||
// TextField(
|
Text(AppLocalizations.of(context)!.welpenSpurGefunden),
|
||||||
// keyboardType: TextInputType.number,
|
Checkbox(
|
||||||
// controller: widget.welpenAnz,
|
value: _welpenSpFundChecked,
|
||||||
// ),
|
onChanged: (val) {
|
||||||
// Row(
|
setState(() {
|
||||||
// children: [
|
_welpenSpFundChecked = val ?? false;
|
||||||
// Text(AppLocalizations.of(context)!.sicher),
|
});
|
||||||
// Checkbox(
|
},
|
||||||
// value: _wpSicher,
|
),
|
||||||
// onChanged: (val) {
|
],
|
||||||
// setState(() {
|
),
|
||||||
// _wpSicher = val ?? false;
|
Visibility(
|
||||||
// widget.spSicher.text =
|
visible: _welpenSpFundChecked,
|
||||||
// _spSicher ? "sicher" : "unsicher";
|
child: Column(
|
||||||
// });
|
children: [
|
||||||
// }),
|
Row(
|
||||||
// ],
|
children: [
|
||||||
// ),
|
Expanded(
|
||||||
// ],
|
flex: 7,
|
||||||
// )),
|
child: Align(
|
||||||
// ],
|
alignment: Alignment.bottomLeft,
|
||||||
// ),
|
child: Text(
|
||||||
// ),
|
AppLocalizations.of(
|
||||||
|
context,
|
||||||
|
)!.gesLaengeAllerDokWelpenSpuren,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Expanded(
|
||||||
|
flex: 2,
|
||||||
|
child: TextField(
|
||||||
|
keyboardType: TextInputType.number,
|
||||||
|
controller: widget.welpenSp,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
|
||||||
|
// const SizedBox(height: 10),
|
||||||
|
|
||||||
|
Row(
|
||||||
|
children: [
|
||||||
|
Expanded(
|
||||||
|
flex: 7,
|
||||||
|
child: Align(
|
||||||
|
alignment: Alignment.bottomLeft,
|
||||||
|
child: Text(
|
||||||
|
AppLocalizations.of(
|
||||||
|
context,
|
||||||
|
)!.maxAnzahlZusGefaehrdeterTiere,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Expanded(
|
||||||
|
flex: 2,
|
||||||
|
child: 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";
|
||||||
|
});
|
||||||
|
},
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -175,7 +175,7 @@ class _TrackingState extends State<Tracking> {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
if (positionStreamRunning)
|
if (positionStreamRunning)
|
||||||
IconButton(
|
TextButton(
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
setState(() {
|
setState(() {
|
||||||
positionStreamRunning = false;
|
positionStreamRunning = false;
|
||||||
@@ -183,12 +183,9 @@ class _TrackingState extends State<Tracking> {
|
|||||||
NotificationService().deleteNotification();
|
NotificationService().deleteNotification();
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
icon: Icon(
|
child: Text(AppLocalizations.of(context)!.trackingStop),
|
||||||
Icons.stop_rounded,
|
|
||||||
color: Theme.of(context).colorScheme.errorContainer,
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
IconButton(
|
TextButton(
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
if (positionStreamRunning) {
|
if (positionStreamRunning) {
|
||||||
positionStreamRunning = false;
|
positionStreamRunning = false;
|
||||||
@@ -199,10 +196,10 @@ class _TrackingState extends State<Tracking> {
|
|||||||
}
|
}
|
||||||
setState(() {});
|
setState(() {});
|
||||||
},
|
},
|
||||||
icon:
|
child:
|
||||||
positionStreamRunning
|
positionStreamRunning
|
||||||
? Icon(Icons.pause)
|
? Text(AppLocalizations.of(context)!.trackingPause)
|
||||||
: Icon(Icons.play_arrow),
|
: Text(AppLocalizations.of(context)!.trackingStart)
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -4,7 +4,6 @@ import 'package:fforte/screens/sharedMethods/http_request.dart';
|
|||||||
import 'package:fforte/screens/sharedMethods/save_file.dart';
|
import 'package:fforte/screens/sharedMethods/save_file.dart';
|
||||||
import 'package:fforte/screens/sharedMethods/save_template.dart';
|
import 'package:fforte/screens/sharedMethods/save_template.dart';
|
||||||
import 'package:fforte/screens/sharedMethods/save_main_entry.dart';
|
import 'package:fforte/screens/sharedMethods/save_main_entry.dart';
|
||||||
import 'package:file_picker/file_picker.dart';
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:fforte/l10n/app_localizations.dart';
|
import 'package:fforte/l10n/app_localizations.dart';
|
||||||
import 'package:geolocator/geolocator.dart';
|
import 'package:geolocator/geolocator.dart';
|
||||||
@@ -106,15 +105,16 @@ class AddEntriesDialogHelper {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
static Future<void> showSaveOptionsDialog(
|
static Future<bool> showSaveOptionsDialog(
|
||||||
BuildContext context,
|
BuildContext context,
|
||||||
Map<String, String> saveData,
|
Map<String, String> saveData,
|
||||||
bool isTemplate,
|
bool isTemplate,
|
||||||
DatabasesEnum dbType,
|
DatabasesEnum dbType,
|
||||||
) async {
|
) async {
|
||||||
bool isLoading = false;
|
bool isLoading = false;
|
||||||
|
bool pop = false;
|
||||||
|
|
||||||
return showDialog(
|
await showDialog(
|
||||||
context: context,
|
context: context,
|
||||||
barrierDismissible: false,
|
barrierDismissible: false,
|
||||||
builder: (BuildContext context) {
|
builder: (BuildContext context) {
|
||||||
@@ -136,6 +136,7 @@ class AddEntriesDialogHelper {
|
|||||||
if (!isLoading)
|
if (!isLoading)
|
||||||
TextButton(
|
TextButton(
|
||||||
onPressed: () async {
|
onPressed: () async {
|
||||||
|
pop = true;
|
||||||
setState(() => isLoading = true);
|
setState(() => isLoading = true);
|
||||||
saveTemplate(saveData, dbType);
|
saveTemplate(saveData, dbType);
|
||||||
Navigator.pushNamedAndRemoveUntil(
|
Navigator.pushNamedAndRemoveUntil(
|
||||||
@@ -143,6 +144,13 @@ class AddEntriesDialogHelper {
|
|||||||
'/home',
|
'/home',
|
||||||
(route) => false,
|
(route) => false,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
if (context.mounted) {
|
||||||
|
SnackBarHelper.showSnackBarMessage(
|
||||||
|
context,
|
||||||
|
AppLocalizations.of(context)!.erfolgreich,
|
||||||
|
);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
child: Text(AppLocalizations.of(context)!.template),
|
child: Text(AppLocalizations.of(context)!.template),
|
||||||
),
|
),
|
||||||
@@ -177,6 +185,7 @@ class AddEntriesDialogHelper {
|
|||||||
sent: true,
|
sent: true,
|
||||||
);
|
);
|
||||||
showSuccessDialog(context);
|
showSuccessDialog(context);
|
||||||
|
pop = true;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
child: Text(AppLocalizations.of(context)!.sendtoserver),
|
child: Text(AppLocalizations.of(context)!.sendtoserver),
|
||||||
@@ -187,7 +196,7 @@ class AddEntriesDialogHelper {
|
|||||||
setState(() => isLoading = true);
|
setState(() => isLoading = true);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
SaveMainEntryMethod.saveEntry(
|
int id = await SaveMainEntryMethod.saveEntry(
|
||||||
entryData: saveData,
|
entryData: saveData,
|
||||||
isTemplate: isTemplate,
|
isTemplate: isTemplate,
|
||||||
dbType: dbType,
|
dbType: dbType,
|
||||||
@@ -196,12 +205,20 @@ class AddEntriesDialogHelper {
|
|||||||
if (context.mounted) {
|
if (context.mounted) {
|
||||||
await SaveFileMethod.saveFile(
|
await SaveFileMethod.saveFile(
|
||||||
saveData,
|
saveData,
|
||||||
|
id,
|
||||||
dbType == DatabasesEnum.place
|
dbType == DatabasesEnum.place
|
||||||
? AppLocalizations.of(context)!.justplace
|
? AppLocalizations.of(context)!.justplace
|
||||||
: AppLocalizations.of(context)!.excursion,
|
: AppLocalizations.of(context)!.excursion,
|
||||||
dbType,
|
dbType,
|
||||||
);
|
);
|
||||||
if (context.mounted) Navigator.of(context).pop();
|
if (context.mounted) {
|
||||||
|
Navigator.of(context).pop();
|
||||||
|
SnackBarHelper.showSnackBarMessage(
|
||||||
|
context,
|
||||||
|
AppLocalizations.of(context)!.erfolgreich,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
pop = true;
|
||||||
}
|
}
|
||||||
} catch (_) {
|
} catch (_) {
|
||||||
// User cancelled the dialog
|
// User cancelled the dialog
|
||||||
@@ -233,6 +250,13 @@ class AddEntriesDialogHelper {
|
|||||||
'/home',
|
'/home',
|
||||||
(route) => false,
|
(route) => false,
|
||||||
);
|
);
|
||||||
|
pop = true;
|
||||||
|
if (context.mounted) {
|
||||||
|
SnackBarHelper.showSnackBarMessage(
|
||||||
|
context,
|
||||||
|
AppLocalizations.of(context)!.erfolgreich,
|
||||||
|
);
|
||||||
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
debugPrint(e.toString());
|
debugPrint(e.toString());
|
||||||
}
|
}
|
||||||
@@ -252,6 +276,8 @@ class AddEntriesDialogHelper {
|
|||||||
);
|
);
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
|
return pop;
|
||||||
}
|
}
|
||||||
|
|
||||||
static Future<void> showSuccessDialog(BuildContext context) async {
|
static Future<void> showSuccessDialog(BuildContext context) async {
|
||||||
|
|||||||
@@ -12,17 +12,20 @@ class IntroScreen extends StatefulWidget {
|
|||||||
class _IntroScreenState extends State<IntroScreen> {
|
class _IntroScreenState extends State<IntroScreen> {
|
||||||
TextEditingController addresse1C = TextEditingController();
|
TextEditingController addresse1C = TextEditingController();
|
||||||
TextEditingController bLandC = TextEditingController();
|
TextEditingController bLandC = TextEditingController();
|
||||||
TextEditingController apiAddress = TextEditingController();
|
TextEditingController ffApiAddress = TextEditingController();
|
||||||
|
TextEditingController exApiAddress = TextEditingController();
|
||||||
|
|
||||||
String selectedApiAddress = "Test";
|
String selectedFFApiAddress = "Test";
|
||||||
String? selectedBLand;
|
String selectedEXApiAddress = "Test";
|
||||||
|
String? selectedBLand = "Sachsen";
|
||||||
|
|
||||||
Future<void> _saveData() async {
|
Future<void> _saveData() async {
|
||||||
SharedPreferences prefs = await SharedPreferences.getInstance();
|
SharedPreferences prefs = await SharedPreferences.getInstance();
|
||||||
await prefs.setString('addresse1', addresse1C.text);
|
await prefs.setString('addresse1', addresse1C.text);
|
||||||
await prefs.setString('bLand', bLandC.text);
|
await prefs.setString('bLand', bLandC.text);
|
||||||
await prefs.setBool('isFirstLaunch', false);
|
await prefs.setBool('isFirstLaunch', false);
|
||||||
await prefs.setString('apiAddress', apiAddress.text);
|
await prefs.setString('fotofallenApiAddress', ffApiAddress.text);
|
||||||
|
await prefs.setString('exkursionenApiAddress', exApiAddress.text);
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
@@ -35,9 +38,10 @@ class _IntroScreenState extends State<IntroScreen> {
|
|||||||
Future.delayed(Duration.zero, () async {
|
Future.delayed(Duration.zero, () async {
|
||||||
SharedPreferences prefs = await SharedPreferences.getInstance();
|
SharedPreferences prefs = await SharedPreferences.getInstance();
|
||||||
setState(() {
|
setState(() {
|
||||||
apiAddress.text = prefs.getString('apiAddress') ?? "";
|
ffApiAddress.text = prefs.getString('fotofallenApiAddress') ?? "";
|
||||||
|
exApiAddress.text = prefs.getString('exkursionenApiAddress') ?? "";
|
||||||
addresse1C.text = prefs.getString('addresse1') ?? "";
|
addresse1C.text = prefs.getString('addresse1') ?? "";
|
||||||
bLandC.text = prefs.getString('bLand') ?? "";
|
bLandC.text = prefs.getString('bLand') ?? "Sachsen";
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -71,88 +75,89 @@ class _IntroScreenState extends State<IntroScreen> {
|
|||||||
Expanded(
|
Expanded(
|
||||||
flex: 4,
|
flex: 4,
|
||||||
child: TextField(
|
child: TextField(
|
||||||
|
readOnly: true,
|
||||||
controller: bLandC,
|
controller: bLandC,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Expanded(
|
// Expanded(
|
||||||
flex: 1,
|
// flex: 1,
|
||||||
child: PopupMenuButton(
|
// child: PopupMenuButton(
|
||||||
icon: const Icon(Icons.arrow_drop_down),
|
// icon: const Icon(Icons.arrow_drop_down),
|
||||||
initialValue: selectedBLand,
|
// initialValue: selectedBLand,
|
||||||
onSelected: (value) {
|
// onSelected: (value) {
|
||||||
setState(() {
|
// setState(() {
|
||||||
selectedBLand = value;
|
// selectedBLand = value;
|
||||||
bLandC.text = value;
|
// bLandC.text = value;
|
||||||
});
|
// });
|
||||||
},
|
// },
|
||||||
itemBuilder: (context) => const <PopupMenuEntry>[
|
// itemBuilder: (context) => const <PopupMenuEntry>[
|
||||||
PopupMenuItem(
|
// PopupMenuItem(
|
||||||
value: 'Baden-Württemberg',
|
// value: 'Baden-Württemberg',
|
||||||
child: Text('Baden-Württemberg'),
|
// child: Text('Baden-Württemberg'),
|
||||||
),
|
// ),
|
||||||
PopupMenuItem(
|
// PopupMenuItem(
|
||||||
value: 'Bayern',
|
// value: 'Bayern',
|
||||||
child: Text('Bayern'),
|
// child: Text('Bayern'),
|
||||||
),
|
// ),
|
||||||
PopupMenuItem(
|
// PopupMenuItem(
|
||||||
value: 'Berlin',
|
// value: 'Berlin',
|
||||||
child: Text('Berlin'),
|
// child: Text('Berlin'),
|
||||||
),
|
// ),
|
||||||
PopupMenuItem(
|
// PopupMenuItem(
|
||||||
value: 'Brandenburg',
|
// value: 'Brandenburg',
|
||||||
child: Text('Brandenburg'),
|
// child: Text('Brandenburg'),
|
||||||
),
|
// ),
|
||||||
PopupMenuItem(
|
// PopupMenuItem(
|
||||||
value: 'Bremen',
|
// value: 'Bremen',
|
||||||
child: Text('Bremen'),
|
// child: Text('Bremen'),
|
||||||
),
|
// ),
|
||||||
PopupMenuItem(
|
// PopupMenuItem(
|
||||||
value: 'Hamburg',
|
// value: 'Hamburg',
|
||||||
child: Text('Hamburg'),
|
// child: Text('Hamburg'),
|
||||||
),
|
// ),
|
||||||
PopupMenuItem(
|
// PopupMenuItem(
|
||||||
value: 'Hessen',
|
// value: 'Hessen',
|
||||||
child: Text('Hessen'),
|
// child: Text('Hessen'),
|
||||||
),
|
// ),
|
||||||
PopupMenuItem(
|
// PopupMenuItem(
|
||||||
value: 'Mecklenburg-Vorpommern',
|
// value: 'Mecklenburg-Vorpommern',
|
||||||
child: Text('Mecklenburg-Vorpommern'),
|
// child: Text('Mecklenburg-Vorpommern'),
|
||||||
),
|
// ),
|
||||||
PopupMenuItem(
|
// PopupMenuItem(
|
||||||
value: 'Niedersachsen',
|
// value: 'Niedersachsen',
|
||||||
child: Text('Niedersachsen'),
|
// child: Text('Niedersachsen'),
|
||||||
),
|
// ),
|
||||||
PopupMenuItem(
|
// PopupMenuItem(
|
||||||
value: 'Nordrhein-Westfalen',
|
// value: 'Nordrhein-Westfalen',
|
||||||
child: Text('Nordrhein-Westfalen'),
|
// child: Text('Nordrhein-Westfalen'),
|
||||||
),
|
// ),
|
||||||
PopupMenuItem(
|
// PopupMenuItem(
|
||||||
value: 'Rheinland-Pfalz',
|
// value: 'Rheinland-Pfalz',
|
||||||
child: Text('Rheinland-Pfalz'),
|
// child: Text('Rheinland-Pfalz'),
|
||||||
),
|
// ),
|
||||||
PopupMenuItem(
|
// PopupMenuItem(
|
||||||
value: 'Saarland',
|
// value: 'Saarland',
|
||||||
child: Text('Saarland'),
|
// child: Text('Saarland'),
|
||||||
),
|
// ),
|
||||||
PopupMenuItem(
|
// PopupMenuItem(
|
||||||
value: 'Sachsen',
|
// value: 'Sachsen',
|
||||||
child: Text('Sachsen'),
|
// child: Text('Sachsen'),
|
||||||
),
|
// ),
|
||||||
PopupMenuItem(
|
// PopupMenuItem(
|
||||||
value: 'Sachsen-Anhalt',
|
// value: 'Sachsen-Anhalt',
|
||||||
child: Text('Sachsen-Anhalt'),
|
// child: Text('Sachsen-Anhalt'),
|
||||||
),
|
// ),
|
||||||
PopupMenuItem(
|
// PopupMenuItem(
|
||||||
value: 'Schleswig-Holstein',
|
// value: 'Schleswig-Holstein',
|
||||||
child: Text('Schleswig-Holstein'),
|
// child: Text('Schleswig-Holstein'),
|
||||||
),
|
// ),
|
||||||
PopupMenuItem(
|
// PopupMenuItem(
|
||||||
value: 'Thüringen',
|
// value: 'Thüringen',
|
||||||
child: Text('Thüringen'),
|
// child: Text('Thüringen'),
|
||||||
),
|
// ),
|
||||||
],
|
// ],
|
||||||
),
|
// ),
|
||||||
),
|
// ),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
const SizedBox(
|
const SizedBox(
|
||||||
@@ -165,25 +170,61 @@ class _IntroScreenState extends State<IntroScreen> {
|
|||||||
child: TextField(
|
child: TextField(
|
||||||
decoration: InputDecoration(
|
decoration: InputDecoration(
|
||||||
hintText:
|
hintText:
|
||||||
AppLocalizations.of(context)!.apiaddress),
|
AppLocalizations.of(context)!.ffApiAddress),
|
||||||
controller: apiAddress,
|
controller: ffApiAddress,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Expanded(
|
Expanded(
|
||||||
flex: 1,
|
flex: 1,
|
||||||
child: PopupMenuButton(
|
child: PopupMenuButton(
|
||||||
icon: const Icon(Icons.arrow_drop_down),
|
icon: const Icon(Icons.arrow_drop_down),
|
||||||
initialValue: selectedApiAddress,
|
initialValue: selectedFFApiAddress,
|
||||||
onSelected: (value) {
|
onSelected: (value) {
|
||||||
setState(() {
|
setState(() {
|
||||||
selectedApiAddress = value;
|
selectedFFApiAddress = value;
|
||||||
apiAddress.text = value;
|
ffApiAddress.text = value;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
itemBuilder: (context) => <PopupMenuEntry>[
|
itemBuilder: (context) => <PopupMenuEntry>[
|
||||||
PopupMenuItem(
|
PopupMenuItem(
|
||||||
value:
|
value:
|
||||||
"http://192.168.1.106/www.dbb-wolf.de/data/app24.php",
|
"http://192.168.1.106/www.dbb-wolf.de/data/app24.php",
|
||||||
|
child:
|
||||||
|
Text(AppLocalizations.of(context)!.test)),
|
||||||
|
PopupMenuItem(
|
||||||
|
value: "...",
|
||||||
|
child: Text(
|
||||||
|
AppLocalizations.of(context)!.notest))
|
||||||
|
],
|
||||||
|
))
|
||||||
|
],
|
||||||
|
),
|
||||||
|
Row(
|
||||||
|
children: [
|
||||||
|
Expanded(
|
||||||
|
flex: 4,
|
||||||
|
child: TextField(
|
||||||
|
decoration: InputDecoration(
|
||||||
|
hintText:
|
||||||
|
AppLocalizations.of(context)!.exApiAddress),
|
||||||
|
controller: exApiAddress,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Expanded(
|
||||||
|
flex: 1,
|
||||||
|
child: PopupMenuButton(
|
||||||
|
icon: const Icon(Icons.arrow_drop_down),
|
||||||
|
initialValue: selectedEXApiAddress,
|
||||||
|
onSelected: (value) {
|
||||||
|
setState(() {
|
||||||
|
selectedEXApiAddress = value;
|
||||||
|
exApiAddress.text = value;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
itemBuilder: (context) => <PopupMenuEntry>[
|
||||||
|
PopupMenuItem(
|
||||||
|
value:
|
||||||
|
"http://192.168.1.106/www.dbb-wolf.de/data/app24.php",
|
||||||
child:
|
child:
|
||||||
Text(AppLocalizations.of(context)!.test)),
|
Text(AppLocalizations.of(context)!.test)),
|
||||||
PopupMenuItem(
|
PopupMenuItem(
|
||||||
|
|||||||
@@ -19,8 +19,13 @@ class HttpRequest {
|
|||||||
Response(requestOptions: RequestOptions(path: ''), statusCode: 400);
|
Response(requestOptions: RequestOptions(path: ''), statusCode: 400);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
response = await dio.post(prefs.getString('apiAddress') ?? "",
|
if (saveDataMap != null && saveDataMap.containsKey("CID") || saveDataString != null && saveDataString.contains("CID")) {
|
||||||
|
response = await dio.post(prefs.getString('fotofallenApiAddress') ?? "",
|
||||||
data: saveDataMap == null ? saveDataString : jsonEncode(saveDataMap));
|
data: saveDataMap == null ? saveDataString : jsonEncode(saveDataMap));
|
||||||
|
} else {
|
||||||
|
response = await dio.post(prefs.getString('exkursionenApiAddress') ?? "",
|
||||||
|
data: saveDataMap == null ? saveDataString : jsonEncode(saveDataMap));
|
||||||
|
}
|
||||||
|
|
||||||
return response.statusCode!;
|
return response.statusCode!;
|
||||||
} on DioException {
|
} on DioException {
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ import 'package:shared_preferences/shared_preferences.dart';
|
|||||||
class SaveFileMethod {
|
class SaveFileMethod {
|
||||||
static Future<void> saveFile(
|
static Future<void> saveFile(
|
||||||
Map<String, String> place,
|
Map<String, String> place,
|
||||||
|
int id,
|
||||||
String fileNameLocalization,
|
String fileNameLocalization,
|
||||||
DatabasesEnum dbType,
|
DatabasesEnum dbType,
|
||||||
) async {
|
) async {
|
||||||
@@ -26,7 +27,7 @@ class SaveFileMethod {
|
|||||||
await prefs.setString('saveDir', selectedDirectory);
|
await prefs.setString('saveDir', selectedDirectory);
|
||||||
|
|
||||||
File file = File(
|
File file = File(
|
||||||
'$selectedDirectory/$fileNameLocalization-${dbType == DatabasesEnum.place ? place["CID"] : place["LogDat"]}.txt',
|
'$selectedDirectory/$fileNameLocalization-$id-${dbType == DatabasesEnum.place ? place["CID"] : place["Datum"]!.split(" ").first}.txt',
|
||||||
);
|
);
|
||||||
|
|
||||||
await file.writeAsString(jsonPlace);
|
await file.writeAsString(jsonPlace);
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import 'package:fforte/methods/excursion_db_helper.dart';
|
|||||||
import 'package:fforte/methods/place_db_helper.dart';
|
import 'package:fforte/methods/place_db_helper.dart';
|
||||||
|
|
||||||
class SaveMainEntryMethod {
|
class SaveMainEntryMethod {
|
||||||
static void saveEntry({
|
static Future<int> saveEntry({
|
||||||
required Map<String, String> entryData,
|
required Map<String, String> entryData,
|
||||||
required bool isTemplate,
|
required bool isTemplate,
|
||||||
required DatabasesEnum dbType,
|
required DatabasesEnum dbType,
|
||||||
@@ -34,5 +34,7 @@ class SaveMainEntryMethod {
|
|||||||
placeDB.updateSent(entryId); // Update 'Sent' using the correct ID
|
placeDB.updateSent(entryId); // Update 'Sent' using the correct ID
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return entryId;
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -39,8 +39,7 @@ class _SendFileState extends State<SendFile> {
|
|||||||
ElevatedButton(
|
ElevatedButton(
|
||||||
onPressed: () async {
|
onPressed: () async {
|
||||||
final dio = Dio();
|
final dio = Dio();
|
||||||
final SharedPreferences prefs =
|
final SharedPreferences prefs = await SharedPreferences.getInstance();
|
||||||
await SharedPreferences.getInstance();
|
|
||||||
String? fileContent = await pickedFile?.readAsString();
|
String? fileContent = await pickedFile?.readAsString();
|
||||||
|
|
||||||
dio.options.responseType = ResponseType.plain;
|
dio.options.responseType = ResponseType.plain;
|
||||||
|
|||||||
4
time.txt
4
time.txt
@@ -91,3 +91,7 @@
|
|||||||
27.mai 1h 30min
|
27.mai 1h 30min
|
||||||
27.mai 1h 30min
|
27.mai 1h 30min
|
||||||
2.jun 1h
|
2.jun 1h
|
||||||
|
3.jun 5h
|
||||||
|
|
||||||
|
-- Abgerechnet --
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1 @@
|
|||||||
{
|
{}
|
||||||
"de": [
|
|
||||||
"excursion"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user