fixed history

This commit is contained in:
Mohamed Nouffer
2023-09-12 16:00:58 +05:30
parent 48f4b833f6
commit f64ac1ccfd
4 changed files with 21 additions and 8 deletions

View File

@ -442,7 +442,7 @@ class DestinationController extends GetxController {
try {
print("--- 000 ---- $skip_gps----");
await Future.delayed(const Duration(milliseconds: 1500));
await Future.delayed(const Duration(milliseconds: 3500));
final la = current_lat;
final ln = current_lon;
for (GeoJsonFeature fs in indexController.locations[0].collection) {
@ -541,6 +541,7 @@ class DestinationController extends GetxController {
if (ddd.isEmpty) {
destination.checkedin = true;
destination.checkin_image = imageurl;
await db.insertDestination(destination);
}

View File

@ -41,17 +41,24 @@ class _HistoryPageState extends State<HistoryPage> {
print("----- history -----");
return Container(
width: MediaQuery.of(context).size.width,
height: 150,
height: MediaQuery.of(context).size.height,
child: ListView.builder(
itemCount: dests.length,
itemBuilder: (ctx, index) {
print("--- photo ${dests[index].checkin_image!} ----");
return ListTile(
title: Text(dests[index].name ?? ""),
subtitle:
Text(dests[index].address ?? ""),
leading: dests[0].photos != null
? Container(width: 100, height: 100, child: Image.file(File(dests[0].photos!)))
leading: dests[index].checkin_image != null
? Container(width: 100, height: 100, child: Image.file(File(dests[index].checkin_image!)))
: Container(),
trailing: ElevatedButton(
child: Text(dests[index].cp.toString()),
style: ElevatedButton.styleFrom(shape: CircleBorder()),
onPressed: () {
},),
);
}));
} else {