Fehlerkorrekturen
This commit is contained in:
1 parent
125e6eb03e
commit
5411da55b7
2 files changed
+25
-9
No files matched your search
@@ -63,7 +63,7 @@ class _TourListPageState extends State<TourListPage> {
|
|||||||
return Util.getWaitWidget(context);
|
return Util.getWaitWidget(context);
|
||||||
}
|
}
|
||||||
|
|
||||||
late List<Widget> jobWidgets = _createjobWidgets();
|
late List<Widget> jobWidgets = _createTourWidgets();
|
||||||
|
|
||||||
return Padding(
|
return Padding(
|
||||||
padding: const EdgeInsets.all(18.0),
|
padding: const EdgeInsets.all(18.0),
|
||||||
@@ -124,14 +124,26 @@ class _TourListPageState extends State<TourListPage> {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
List<Widget> _createjobWidgets() {
|
List<Widget> _createTourWidgets() {
|
||||||
List<Widget> jobWidgets = [];
|
List<Widget> tourWidgets = [];
|
||||||
|
|
||||||
|
JobTour? lastTour;
|
||||||
|
|
||||||
for (var tour in _tours) {
|
for (var tour in _tours) {
|
||||||
|
bool tourActive = false;
|
||||||
|
|
||||||
|
if (lastTour == null) {
|
||||||
|
tourActive = true;
|
||||||
|
} else {
|
||||||
|
if (lastTour.state != 0) {
|
||||||
|
tourActive = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Color color = Colors.transparent;
|
Color color = Colors.transparent;
|
||||||
switch (tour.state) {
|
switch (tour.state) {
|
||||||
case 0:
|
case 0:
|
||||||
color = Colors.white;
|
color = tourActive ? Colors.white : Colors.grey;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 1:
|
case 1:
|
||||||
@@ -143,11 +155,15 @@ class _TourListPageState extends State<TourListPage> {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
jobWidgets.add(
|
lastTour = tour;
|
||||||
|
|
||||||
|
tourWidgets.add(
|
||||||
ListTile(
|
ListTile(
|
||||||
contentPadding: const EdgeInsets.all(0),
|
contentPadding: const EdgeInsets.all(0),
|
||||||
onTap: () {
|
onTap: () {
|
||||||
_clicked(tour);
|
if (tourActive) {
|
||||||
|
_clicked(tour);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
title: Container(
|
title: Container(
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
@@ -179,7 +195,7 @@ class _TourListPageState extends State<TourListPage> {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
return jobWidgets;
|
return tourWidgets;
|
||||||
}
|
}
|
||||||
|
|
||||||
void _clicked(JobTour tour) {
|
void _clicked(JobTour tour) {
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ import 'package:stadtbote/tools/util.dart';
|
|||||||
import '../model/job_tour.dart';
|
import '../model/job_tour.dart';
|
||||||
|
|
||||||
showMapPopup(BuildContext context, JobTour currentTour, List<JobTour> tourList) async {
|
showMapPopup(BuildContext context, JobTour currentTour, List<JobTour> tourList) async {
|
||||||
/*await showDialog(
|
await showDialog(
|
||||||
context: context,
|
context: context,
|
||||||
builder: (BuildContext context) {
|
builder: (BuildContext context) {
|
||||||
return AlertDialog(
|
return AlertDialog(
|
||||||
@@ -188,5 +188,5 @@ showMapPopup(BuildContext context, JobTour currentTour, List<JobTour> tourList)
|
|||||||
),
|
),
|
||||||
));
|
));
|
||||||
}));
|
}));
|
||||||
});*/
|
});
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user