besprechung
This commit is contained in:
@@ -13,6 +13,7 @@ import 'package:fforte/l10n/app_localizations.dart';
|
||||
import 'package:geolocator/geolocator.dart';
|
||||
import 'package:latlong2/latlong.dart';
|
||||
import 'package:animations/animations.dart';
|
||||
import 'package:shared_preferences/shared_preferences.dart';
|
||||
|
||||
import 'widgets/abbau_dat.dart';
|
||||
import 'widgets/karte.dart';
|
||||
@@ -164,11 +165,15 @@ class _AddCamMainState extends State<AddCamMain> {
|
||||
}
|
||||
} else {
|
||||
// If it is not a template set default values
|
||||
rmap["Datum"]!["controller"]!.text = DateTime.now().toString();
|
||||
rmap["Datum"]!["controller"]!.text = DateTime.now().toString().split(" ").first;
|
||||
rmap["Status"]!["controller"]!.text = "aktiv";
|
||||
rmap["FotoFilm"]!["controller"]!.text = "Foto";
|
||||
rmap["MEZ"]!["controller"]!.text = "Sommerzeit";
|
||||
rmap["Platzung"]!["controller"]!.text = "";
|
||||
SharedPreferences.getInstance().then((SharedPreferences prefs) {
|
||||
rmap["KTage1"]!["controller"]!.text = prefs.getString("kTage1");
|
||||
rmap["KTage2"]!["controller"]!.text = prefs.getString("kTage2");
|
||||
});
|
||||
}
|
||||
|
||||
// Set initial default position
|
||||
@@ -201,7 +206,6 @@ class _AddCamMainState extends State<AddCamMain> {
|
||||
);
|
||||
}
|
||||
}
|
||||
return currentPosition;
|
||||
});
|
||||
}
|
||||
|
||||
@@ -353,7 +357,7 @@ class _AddCamMainState extends State<AddCamMain> {
|
||||
}
|
||||
}
|
||||
|
||||
if (!mounted) return;
|
||||
if (!context.mounted) return;
|
||||
|
||||
final result = await Navigator.of(context).push<LatLng>(
|
||||
MaterialPageRoute(
|
||||
@@ -480,7 +484,7 @@ class _AddCamMainState extends State<AddCamMain> {
|
||||
initDatum: DateTime.parse(rmap["Datum"]!["controller"]!.text),
|
||||
onDateChanged: (value) {
|
||||
setState(() {
|
||||
rmap["Datum"]!["controller"]!.text = value.toString();
|
||||
rmap["Datum"]!["controller"]!.text = value.toString().split(" ").first;
|
||||
});
|
||||
},
|
||||
name: AppLocalizations.of(context)!.pickDate,
|
||||
@@ -705,8 +709,8 @@ class _AddCamMainState extends State<AddCamMain> {
|
||||
}
|
||||
|
||||
bool empty = CheckRequired.checkRequired(rmap);
|
||||
// TODO for debugging always false
|
||||
empty = false;
|
||||
// for debugging always false
|
||||
// empty = false;
|
||||
|
||||
if (empty == true) {
|
||||
AddEntriesDialogHelper.showTemplateDialog(
|
||||
|
||||
Reference in New Issue
Block a user