Fehlerkorrekturen und Erweiterungen
This commit is contained in:
1 parent
777876bc8d
commit
1f3cc1e995
357 files changed
+50603
-572
No files matched your search
+25
-18
@@ -8,6 +8,8 @@ import 'package:stadtbote/tools/util.dart';
|
||||
|
||||
import '../model/job_tour.dart';
|
||||
|
||||
List<Color> _colors = [Colors.red, Colors.green];
|
||||
|
||||
showMapPopup(BuildContext context, JobTour currentTour, List<JobTour> tourList) async {
|
||||
await showDialog(
|
||||
context: context,
|
||||
@@ -29,7 +31,7 @@ showMapPopup(BuildContext context, JobTour currentTour, List<JobTour> tourList)
|
||||
GestureDetector(
|
||||
onTap: () async {
|
||||
if (tour.pos != null) {
|
||||
mapController.move(LatLng(tour.pos!.lat, tour.pos!.long), mapController.zoom);
|
||||
mapController.move(LatLng(tour.pos!.lat, tour.pos!.long), mapController.camera.zoom);
|
||||
|
||||
streamController[currentTour.sort]!.sink.add(false);
|
||||
|
||||
@@ -93,9 +95,12 @@ showMapPopup(BuildContext context, JobTour currentTour, List<JobTour> tourList)
|
||||
List<Marker> markers = [];
|
||||
for (var tour in tourList) {
|
||||
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)));
|
||||
markers.add(Marker(
|
||||
point: LatLng(tour.pos!.lat, tour.pos!.long),
|
||||
width: 56,
|
||||
height: 56,
|
||||
child: const Icon(Icons.person_pin_circle, size: 56, color: Colors.blue),
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -137,23 +142,25 @@ showMapPopup(BuildContext context, JobTour currentTour, List<JobTour> tourList)
|
||||
current: value,
|
||||
first: true,
|
||||
second: false,
|
||||
dif: 0.0,
|
||||
borderColor: Colors.transparent,
|
||||
style: ToggleStyle(
|
||||
borderColor: Colors.transparent,
|
||||
boxShadow: const [
|
||||
BoxShadow(
|
||||
color: Colors.black26,
|
||||
spreadRadius: 1,
|
||||
blurRadius: 2,
|
||||
offset: Offset(0, 1.5),
|
||||
),
|
||||
],
|
||||
indicatorColor: Colors.red
|
||||
),
|
||||
borderWidth: 5.0,
|
||||
height: 25,
|
||||
boxShadow: const [
|
||||
BoxShadow(
|
||||
color: Colors.black26,
|
||||
spreadRadius: 1,
|
||||
blurRadius: 2,
|
||||
offset: Offset(0, 1.5),
|
||||
),
|
||||
],
|
||||
onChanged: (b) {
|
||||
valueNotifier.value = b;
|
||||
mapController.move(mapController.center, b ? 14.0 : 16.0);
|
||||
mapController.move(mapController.camera.center, b ? 14.0 : 16.0);
|
||||
},
|
||||
colorBuilder: (b) => b ? Colors.red : Colors.green,
|
||||
styleBuilder: (i) => ToggleStyle(indicatorColor: i == true ? _colors[0] : _colors[1]),
|
||||
textBuilder: (value) => value ? const Center(child: Text('Fern')) : const Center(child: Text('Nah')),
|
||||
);
|
||||
},
|
||||
@@ -168,8 +175,8 @@ showMapPopup(BuildContext context, JobTour currentTour, List<JobTour> tourList)
|
||||
child: FlutterMap(
|
||||
mapController: mapController,
|
||||
options: MapOptions(
|
||||
center: LatLng(currentTour.pos!.lat, currentTour.pos!.long),
|
||||
zoom: 14,
|
||||
//center: LatLng(currentTour.pos!.lat, currentTour.pos!.long),
|
||||
//zoom: 14,
|
||||
),
|
||||
children: [
|
||||
TileLayer(
|
||||
|
||||
Reference in new issue
Block a user