Fehlerkorrekturen

This commit is contained in:
Sven committed 2024-02-28 09:41:03 +01:00
1 parent b18a0c4526
commit faef9ac5d9
3 files changed
+50 -43

No files matched your search

+18 -10
View File
@@ -4,11 +4,12 @@ import 'package:animated_toggle_switch/animated_toggle_switch.dart';
import 'package:flutter/material.dart';
import 'package:flutter_map/flutter_map.dart';
import 'package:latlong2/latlong.dart';
import 'package:stadtbote/tools/util.dart';
import '../model/job_tour.dart';
showMapPopup(BuildContext context, JobTour currentTour, List<JobTour> tourList) async {
await showDialog(
/*await showDialog(
context: context,
builder: (BuildContext context) {
return AlertDialog(
@@ -27,12 +28,16 @@ showMapPopup(BuildContext context, JobTour currentTour, List<JobTour> tourList)
tourWidgets.add(
GestureDetector(
onTap: () async {
mapController.move(LatLng(tour.pos!.lat, tour.pos!.long), mapController.zoom);
if (tour.pos != null) {
mapController.move(LatLng(tour.pos!.lat, tour.pos!.long), mapController.zoom);
streamController[currentTour.sort]!.sink.add(false);
streamController[currentTour.sort]!.sink.add(false);
currentTour = tour;
streamController[tour.sort]!.sink.add(true);
currentTour = tour;
streamController[tour.sort]!.sink.add(true);
} else {
showAlertDialog(context, 'Information', 'Es liegt keine Position für diese Station vor');
}
},
child: SizedBox(
width: 70,
@@ -87,17 +92,20 @@ showMapPopup(BuildContext context, JobTour currentTour, List<JobTour> tourList)
List<Marker> markers = [];
for (var tour in tourList) {
markers.add(Marker(
builder: (context) => const Icon(Icons.person_pin_circle, size: 56, color: Colors.blue),
point: LatLng(tour.pos!.lat, tour.pos!.long)));
if (tour.pos != null) {
markers.add(Marker(
builder: (context) => const Icon(Icons.person_pin_circle, size: 56, color: Colors.blue),
point: LatLng(tour.pos!.lat, tour.pos!.long)));
}
}
return Container(
padding: const EdgeInsets.fromLTRB(30, 0, 30, 0),
padding: const EdgeInsets.fromLTRB(0, 0, 0, 0),
key: GlobalKey(),
height: MediaQuery.of(context).size.height * 0.6,
child: Container(
height: 100,
width: MediaQuery.of(context).size.width * 1,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(10),
color: Colors.white,
@@ -180,5 +188,5 @@ showMapPopup(BuildContext context, JobTour currentTour, List<JobTour> tourList)
),
));
}));
});
});*/
}