Fehlerkorrekturen

This commit is contained in:
Sven committed 2024-02-28 15:00:17 +01:00
1 parent 125e6eb03e
commit 5411da55b7
2 files changed
+25 -9

No files matched your search

+23 -7
View File
@@ -63,7 +63,7 @@ class _TourListPageState extends State<TourListPage> {
return Util.getWaitWidget(context);
}
late List<Widget> jobWidgets = _createjobWidgets();
late List<Widget> jobWidgets = _createTourWidgets();
return Padding(
padding: const EdgeInsets.all(18.0),
@@ -124,14 +124,26 @@ class _TourListPageState extends State<TourListPage> {
);
}
List<Widget> _createjobWidgets() {
List<Widget> jobWidgets = [];
List<Widget> _createTourWidgets() {
List<Widget> tourWidgets = [];
JobTour? lastTour;
for (var tour in _tours) {
bool tourActive = false;
if (lastTour == null) {
tourActive = true;
} else {
if (lastTour.state != 0) {
tourActive = true;
}
}
Color color = Colors.transparent;
switch (tour.state) {
case 0:
color = Colors.white;
color = tourActive ? Colors.white : Colors.grey;
break;
case 1:
@@ -143,11 +155,15 @@ class _TourListPageState extends State<TourListPage> {
break;
}
jobWidgets.add(
lastTour = tour;
tourWidgets.add(
ListTile(
contentPadding: const EdgeInsets.all(0),
onTap: () {
_clicked(tour);
if (tourActive) {
_clicked(tour);
}
},
title: Container(
decoration: BoxDecoration(
@@ -179,7 +195,7 @@ class _TourListPageState extends State<TourListPage> {
);
}
return jobWidgets;
return tourWidgets;
}
void _clicked(JobTour tour) {
+2 -2
View File
@@ -9,7 +9,7 @@ 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(
@@ -188,5 +188,5 @@ showMapPopup(BuildContext context, JobTour currentTour, List<JobTour> tourList)
),
));
}));
});*/
});
}