diff --git a/lib/pages/destination/destination_controller.dart b/lib/pages/destination/destination_controller.dart index 81ca569..90ab589 100644 --- a/lib/pages/destination/destination_controller.dart +++ b/lib/pages/destination/destination_controller.dart @@ -180,6 +180,7 @@ class DestinationController extends GetxController { photos.clear(); if (shouldShowBottomSheet) { shouldShowBottomSheet = false; + if (d.cp == -1) return; await showModalBottomSheet( constraints: BoxConstraints.loose(Size(Get.width, Get.height * 0.75)), @@ -208,7 +209,7 @@ class DestinationController extends GetxController { isAtStart.value = true; if (shouldShowBottomSheet) { shouldShowBottomSheet = false; - if (d.cp == 0) return; + if (d.cp == -1) return; await showModalBottomSheet( constraints: BoxConstraints.loose(Size(Get.width, Get.height * 0.85)), @@ -231,7 +232,7 @@ class DestinationController extends GetxController { isInCheckin.value = true; if (shouldShowBottomSheet) { shouldShowBottomSheet = false; - if (d.cp == 0) return; + if (d.cp == -1) return; await showModalBottomSheet( constraints: BoxConstraints.loose(Size(Get.width, Get.height * 0.75)), @@ -279,7 +280,7 @@ class DestinationController extends GetxController { // print("--- calling checkin ---"); if (shouldShowBottomSheet) { shouldShowBottomSheet = false; - if (d.cp == 0) return; + if (d.cp == -1) return; await showModalBottomSheet( constraints: BoxConstraints.loose(Size(Get.width, Get.height * 0.75)), @@ -301,7 +302,7 @@ class DestinationController extends GetxController { isInCheckin.value = true; if (shouldShowBottomSheet) { shouldShowBottomSheet = false; - if (d.cp == 0) return; + if (d.cp == -1) return; await showMaterialModalBottomSheet( expand: true, context: Get.context!, @@ -331,7 +332,7 @@ class DestinationController extends GetxController { //print("--- open buy point $buyPointImageAdded ${d.buypoint_image} ----"); if (shouldShowBottomSheet) { shouldShowBottomSheet = false; - if (d.cp == 0) return; + if (d.cp == -1) return; await showModalBottomSheet( constraints: BoxConstraints.loose(Size(Get.width, Get.height * 0.75)), @@ -370,7 +371,7 @@ class DestinationController extends GetxController { photos.clear(); if (shouldShowBottomSheet) { shouldShowBottomSheet = false; - if (d.cp == 0) return; + if (d.cp == -1) return; await showModalBottomSheet( constraints: BoxConstraints.loose(Size(Get.width, Get.height * 0.75)), @@ -395,7 +396,7 @@ class DestinationController extends GetxController { isAtStart.value = true; if (shouldShowBottomSheet) { shouldShowBottomSheet = false; - if (d.cp == 0) return; + if (d.cp == -1) return; await showModalBottomSheet( constraints: BoxConstraints.loose(Size(Get.width, Get.height * 0.75)), diff --git a/lib/widgets/bottom_sheet_new.dart b/lib/widgets/bottom_sheet_new.dart index ebcf52f..c4bba62 100644 --- a/lib/widgets/bottom_sheet_new.dart +++ b/lib/widgets/bottom_sheet_new.dart @@ -31,8 +31,8 @@ class BottomSheetNew extends GetView { Image getImage() { String serverUrl = ConstValues.currentServer(); + if (indexController.rogMode == 1) { - //print("----- rogaining mode 1"); if (indexController.currentDestinationFeature.isEmpty || indexController.currentDestinationFeature[0].photos! == "") { return const Image(image: AssetImage('assets/images/empty_image.png')); @@ -63,7 +63,7 @@ class BottomSheetNew extends GetView { } } else { GeoJSONFeature gf = indexController.currentFeature[0]; - //print("=== photo sss ${gf.properties!["photos"]}"); + print("=== photo sss ${gf.properties!["photos"]}"); if (gf.properties!["photos"] == null || gf.properties!["photos"] == "") { return const Image(image: AssetImage('assets/images/empty_image.png')); } else { diff --git a/lib/widgets/map_widget.dart b/lib/widgets/map_widget.dart index 73e5e8c..bb55dae 100644 --- a/lib/widgets/map_widget.dart +++ b/lib/widgets/map_widget.dart @@ -88,7 +88,7 @@ class _MapWidgetState extends State { Icons.circle, size: 6.0, ), - i.properties!['cp'] == -1 || i.properties!['cp'] == 0 + i.properties!['cp'] == -1 ? Transform.translate( offset: Offset(18, 0), child: Transform.rotate( @@ -167,8 +167,7 @@ class _MapWidgetState extends State { } void _startIdleTimer() { - _timer = - Timer(const Duration(milliseconds: (1000 * 60 * 10)), _centerMapOnUser); + _timer = Timer(const Duration(milliseconds: (1000 * 10)), _centerMapOnUser); } void _resetTimer() { @@ -180,7 +179,7 @@ class _MapWidgetState extends State { indexController.mapController.move( LatLng( destinationController.currentLat, destinationController.currentLon), - 15.0); + 17.0); } @override