updated cp start back to minus one and auto center timer to 10 sec

This commit is contained in:
2024-03-05 12:20:24 +05:30
parent eaee1ce820
commit cd258744fc
3 changed files with 13 additions and 13 deletions

View File

@ -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)),

View File

@ -31,8 +31,8 @@ class BottomSheetNew extends GetView<BottomSheetController> {
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<BottomSheetController> {
}
} 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 {

View File

@ -88,7 +88,7 @@ class _MapWidgetState extends State<MapWidget> {
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<MapWidget> {
}
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<MapWidget> {
indexController.mapController.move(
LatLng(
destinationController.currentLat, destinationController.currentLon),
15.0);
17.0);
}
@override