Erweiterungen

This commit is contained in:
Sven committed 2024-02-08 10:22:15 +01:00
1 parent 85d6d49258
commit 286c6537b9
2 files changed
+23 -3

No files matched your search

+10 -3
View File
@@ -186,9 +186,16 @@ class _MainState extends State<Main> with SingleTickerProviderStateMixin {
return ColoredSafeArea(
key: GlobalKey(),
child: PopScope(
canPop: contentStack.isNotEmpty,
onPopInvoked: (didPop) => {_popContentView()},
child: WillPopScope(
onWillPop: () async {
if (contentStack.isNotEmpty) {
_popContentView();
return false;
} else {
return true;
}
},
child: Scaffold(
appBar: PreferredSize(
preferredSize: const Size.fromHeight(100),
+13
View File
@@ -104,6 +104,16 @@ void showMapPopup(BuildContext context, JobTour currentTour, List<JobTour> tourL
final ValueNotifier<bool> valueNotifier = ValueNotifier<bool>(true);
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)
)
);
}
return Container(
padding: const EdgeInsets.fromLTRB(30, 0, 30, 0),
key: GlobalKey(),
@@ -184,6 +194,9 @@ void showMapPopup(BuildContext context, JobTour currentTour, List<JobTour> tourL
urlTemplate: 'https://google-maps.assecutor.de/vt/lyrs=m@130&hl=en&x={x}&y={y}&z={z}',
userAgentPackageName: 'com.example.app',
),
MarkerLayer(
markers: markers,
),
],
),
),