Erweiterungen
This commit is contained in:
1 parent
efb55331d2
commit
20a1309946
1 file changed
+8
-19
@@ -93,9 +93,7 @@ class _TourListPageState extends State<TourListPage> {
|
|||||||
Image.asset("assets/${mapVehicleTypeToImageName(widget.job.vhtId)}", width: 60, height: 60),
|
Image.asset("assets/${mapVehicleTypeToImageName(widget.job.vhtId)}", width: 60, height: 60),
|
||||||
const SizedBox(width: 10),
|
const SizedBox(width: 10),
|
||||||
Expanded(
|
Expanded(
|
||||||
child: Text(
|
child: Text(mapVehicleTypeToText(widget.job.vhtId)),
|
||||||
mapVehicleTypeToText(widget.job.vhtId)
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
const SizedBox(width: 10),
|
const SizedBox(width: 10),
|
||||||
SizedBox(
|
SizedBox(
|
||||||
@@ -113,18 +111,14 @@ class _TourListPageState extends State<TourListPage> {
|
|||||||
backgroundColor: MaterialStateProperty.all<Color>(Colors.lightGreen),
|
backgroundColor: MaterialStateProperty.all<Color>(Colors.lightGreen),
|
||||||
foregroundColor: MaterialStateProperty.all<Color>(Colors.black),
|
foregroundColor: MaterialStateProperty.all<Color>(Colors.black),
|
||||||
),
|
),
|
||||||
onPressed: () => { showMapPopup(context, widget.job.tours[0], widget.job.tours)},
|
onPressed: () => {showMapPopup(context, widget.job.tours[0], widget.job.tours)},
|
||||||
child: const Text("Karte")),
|
child: const Text("Karte")),
|
||||||
))
|
))
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
Expanded(
|
Expanded(
|
||||||
child: ListView(
|
child: ListView(padding: const EdgeInsets.all(0), children: jobWidgets),
|
||||||
padding: const EdgeInsets.all(0),
|
|
||||||
children: jobWidgets
|
|
||||||
),
|
|
||||||
)
|
)
|
||||||
|
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
@@ -135,7 +129,7 @@ class _TourListPageState extends State<TourListPage> {
|
|||||||
|
|
||||||
for (var tour in _tours) {
|
for (var tour in _tours) {
|
||||||
Color color = Colors.transparent;
|
Color color = Colors.transparent;
|
||||||
switch(tour.state) {
|
switch (tour.state) {
|
||||||
case 0:
|
case 0:
|
||||||
color = Colors.white;
|
color = Colors.white;
|
||||||
break;
|
break;
|
||||||
@@ -157,10 +151,7 @@ class _TourListPageState extends State<TourListPage> {
|
|||||||
},
|
},
|
||||||
title: Container(
|
title: Container(
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
border: Border.all(color: Colors.grey, width: 0.5),
|
border: Border.all(color: Colors.grey, width: 0.5), color: color, borderRadius: const BorderRadius.all(Radius.circular(13))),
|
||||||
color: color,
|
|
||||||
borderRadius: const BorderRadius.all(Radius.circular(13))
|
|
||||||
),
|
|
||||||
padding: const EdgeInsets.all(5.0),
|
padding: const EdgeInsets.all(5.0),
|
||||||
child: Column(
|
child: Column(
|
||||||
crossAxisAlignment: CrossAxisAlignment.stretch,
|
crossAxisAlignment: CrossAxisAlignment.stretch,
|
||||||
@@ -184,8 +175,7 @@ class _TourListPageState extends State<TourListPage> {
|
|||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
)
|
)),
|
||||||
),
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -193,8 +183,7 @@ class _TourListPageState extends State<TourListPage> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void _clicked(JobTour tour) {
|
void _clicked(JobTour tour) {
|
||||||
if (tour.state == 0) {
|
MessageService().publish<ContentViewWidget>(Constants.messageTopicPushContentView,
|
||||||
MessageService().publish<ContentViewWidget>(Constants.messageTopicPushContentView, arguments: TourDetailsPage(job: widget.job, tour: tour, readOnly: widget.readOnly));
|
arguments: TourDetailsPage(job: widget.job, tour: tour, readOnly: tour.state != 0));
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user