revert some things ig?

This commit is contained in:
Nico
2025-06-06 17:16:20 +02:00
parent d4358e38e2
commit 775b7ce0e7
3 changed files with 256 additions and 210 deletions

View File

@@ -41,6 +41,7 @@ class KarteState extends State<Karte> {
Icons.location_on,
color: Colors.red,
));
saveVisible = true;
}
@override
@@ -51,42 +52,26 @@ class KarteState extends State<Karte> {
actions: [
Visibility(
visible: saveVisible,
child: Row(
children: [
Text(AppLocalizations.of(context)!.saveMap),
TextButton(
onPressed: () async {
// try {
// List<Placemark> placemarks =
// await placemarkFromCoordinates(
// currentMarker!.point.latitude,
// currentMarker!.point.longitude);
//
// widget.beiOrtC.text = placemarks.first.locality!;
// widget.ortInfoC.text = placemarks.first.street!;
// } catch (e) {
// //
// // !!! Localization
// if (context.mounted) {
// SnackBarHelper.showSnackBarMessage(
// context, "Geocoding error");
// }
// debugPrint(e.toString());
// }
if (currentMarker != null) {
setState(() {
widget.decLatC.text =
currentMarker!.point.latitude.toString();
widget.decLngC.text =
currentMarker!.point.longitude.toString();
});
}
if (context.mounted) Navigator.pop(context);
},
child: const Icon(Icons.save),
child: Padding(
padding: const EdgeInsets.symmetric(horizontal: 8.0),
child: ElevatedButton.icon(
onPressed: () async {
if (currentMarker != null) {
setState(() {
widget.decLatC.text =
currentMarker!.point.latitude.toString();
widget.decLngC.text =
currentMarker!.point.longitude.toString();
});
}
if (context.mounted) Navigator.pop(context, currentMarker?.point);
},
icon: const Icon(Icons.save),
label: Text(AppLocalizations.of(context)!.saveMap),
style: ElevatedButton.styleFrom(
padding: const EdgeInsets.symmetric(horizontal: 16.0, vertical: 8.0),
),
],
),
),
),
],