diff --git a/android/app/build.gradle b/android/app/build.gradle
index 318b5f3..a9f974b 100644
--- a/android/app/build.gradle
+++ b/android/app/build.gradle
@@ -55,8 +55,8 @@ android {
// For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration.
minSdkVersion 23
targetSdkVersion 34
- versionCode 61
- versionName '1.5.61'
+ versionCode 62
+ versionName '1.5.62'
// manifestPlaceholders = [mapsApiKey: 'android/app/src/main/AndroidManifest.xml']
}
diff --git a/ios/Runner/Info.plist b/ios/Runner/Info.plist
index 2efa0bc..9b70eb4 100644
--- a/ios/Runner/Info.plist
+++ b/ios/Runner/Info.plist
@@ -37,11 +37,11 @@
CFBundlePackageType
APPL
CFBundleShortVersionString
- 49
+ 50
CFBundleSignature
????
CFBundleVersion
- 4.3.49
+ 4.3.50
FirebaseAppDelegateProxyEnabled
NO
GMSApiKey
diff --git a/lib/controller/auth/login_controller.dart b/lib/controller/auth/login_controller.dart
index eca3c09..042a50c 100644
--- a/lib/controller/auth/login_controller.dart
+++ b/lib/controller/auth/login_controller.dart
@@ -203,12 +203,6 @@ class LoginController extends GetxController {
}
}
- goToMapPage() {
- if (box.read(BoxName.email) != null) {
- Get.offAll(() => const MapPagePassenger());
- }
- }
-
final location = Location();
// late PermissionStatus permissionGranted = PermissionStatus.denied;
@@ -246,10 +240,10 @@ class LoginController extends GetxController {
void onInit() async {
// permissionLocation = await Permission.locationWhenInUse.isGranted;
await getAppTester(AppInformation.appName);
- if (isTest == 0 && box.read(BoxName.passengerID) != null) {
- await loginUsingCredentials(
- box.read(BoxName.passengerID), box.read(BoxName.email));
- }
+ // if (isTest == 0 && box.read(BoxName.passengerID) != null) {
+ // // await loginUsingCredentials(
+ // // box.read(BoxName.passengerID), box.read(BoxName.email));
+ // }
super.onInit();
}
}
diff --git a/lib/controller/home/map_passenger_controller.dart b/lib/controller/home/map_passenger_controller.dart
index f92ed67..61d5014 100644
--- a/lib/controller/home/map_passenger_controller.dart
+++ b/lib/controller/home/map_passenger_controller.dart
@@ -2603,58 +2603,44 @@ class MapPassengerController extends GetxController {
Future getLocation() async {
isLoading = true;
update();
-
- try {
- // Perform permission and service checks in parallel
- final results = await Future.wait([
- location.serviceEnabled(),
- location.hasPermission(),
- ]);
-
- bool serviceEnabled = results[0] as bool; // Cast to bool
- PermissionStatus permissionGranted =
- results[1] as PermissionStatus; // Cast to PermissionStatus
-
- // Check if location services are enabled
+ bool serviceEnabled;
+ PermissionStatus permissionGranted;
+ // dialoge();
+ // Check if location services are enabled
+ serviceEnabled = await location.serviceEnabled();
+ if (!serviceEnabled) {
+ serviceEnabled = await location.requestService();
if (!serviceEnabled) {
- serviceEnabled = await location.requestService();
- if (!serviceEnabled) {
- // Location services are still not enabled, handle the error
- isLoading = false;
- update();
- return;
- }
+ // Location services are still not enabled, handle the error
+ return;
}
-
- // Check if the app has permission to access location
- if (permissionGranted == PermissionStatus.denied) {
- permissionGranted = await location.requestPermission();
- if (permissionGranted != PermissionStatus.granted) {
- // Location permission is still not granted, handle the error
- isLoading = false;
- update();
- return;
- }
- }
-
- // Request updated location with medium accuracy (faster)
- LocationData _locationData = await location.getLocation();
- passengerLocation =
- LatLng(_locationData.latitude!, _locationData.longitude!);
-
- // Process location data
- getLocationArea(passengerLocation.latitude, passengerLocation.longitude);
- newStartPointLocation = passengerLocation;
- speed = _locationData.speed!;
-
- // Update loading state
- isLoading = false;
- update();
- } catch (e) {
- // Handle exceptions (optional logging)
- isLoading = false;
- update();
}
+
+ // Check if the app has permission to access location
+ permissionGranted = await location.hasPermission();
+ if (permissionGranted == PermissionStatus.denied) {
+ permissionGranted = await location.requestPermission();
+ if (permissionGranted != PermissionStatus.granted) {
+ // Location permission is still not granted, handle the error
+ return;
+ }
+ }
+
+ // Configure location accuracy
+ // LocationAccuracy desiredAccuracy = LocationAccuracy.high;
+
+ // Get the current location
+ LocationData _locationData = await location.getLocation();
+ passengerLocation =
+ (_locationData.latitude != null && _locationData.longitude != null
+ ? LatLng(_locationData.latitude!, _locationData.longitude!)
+ : null)!;
+ getLocationArea(passengerLocation.latitude, passengerLocation.longitude);
+ newStartPointLocation = passengerLocation;
+ speed = _locationData.speed!;
+ // //print location details
+ isLoading = false;
+ update();
}
LatLngBounds calculateBounds(
diff --git a/lib/views/home/map_widget.dart/left_main_menu_icons.dart b/lib/views/home/map_widget.dart/left_main_menu_icons.dart
index d004ed5..c6e2705 100644
--- a/lib/views/home/map_widget.dart/left_main_menu_icons.dart
+++ b/lib/views/home/map_widget.dart/left_main_menu_icons.dart
@@ -1,12 +1,17 @@
+import 'package:SEFER/constant/api_key.dart';
import 'package:SEFER/constant/box_name.dart';
import 'package:SEFER/main.dart';
import 'package:SEFER/views/auth/sms_verfy_page.dart';
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:google_maps_flutter/google_maps_flutter.dart';
+import '../../../constant/char_map.dart';
import '../../../constant/colors.dart';
+import '../../../constant/credential.dart';
+import '../../../constant/links.dart';
import '../../../controller/firebase/firbase_messge.dart';
import '../../../controller/functions/audio_record1.dart';
+import '../../../controller/functions/crud.dart';
import '../../../controller/functions/tts.dart';
import '../../../controller/home/map_passenger_controller.dart';
@@ -138,16 +143,17 @@ GetBuilder leftMainMenuIcons() {
// borderRadius: BorderRadius.circular(15)),
// child: IconButton(
// onPressed: () async {
- // await CRUD().allMethodForAI(
- // 'name,fullName,address,idNumber,cardId,dob',
- // AppLink.uploadEgypt,
- // 'idFront');
- //
- // // await ImageController().choosImage(
- // // 'https://api.sefer.live/sefer/uploadEgypt.php',
- // // 'FrontId');
+ // await CRUD().allMethodForAI(
+ // 'name,fullName,address,idNumber,cardId,dob',
+ // AppLink.uploadEgypt,
+ // 'idFront');
+
+ // await ImageController().choosImage(
+ // 'https://api.sefer.live/sefer/uploadEgypt.php',
+ // 'FrontId');
// AC credentials = AC();
- // String apiKey = 'zjujl_qvo_fwjfgjlXrXlBl';
+ // String apiKey =
+ // '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';
// String convertedStringN = credentials.c(
// credentials.c(credentials.c(apiKey, cs), cC), cn);
@@ -160,11 +166,10 @@ GetBuilder leftMainMenuIcons() {
// print('retrievedStringS ---$retrievedStringS');
// print('same');
// }
- //
- // // await Get.find()
- // // .payWithPayMob(context, '1100', 'EGP');
- // // Initiates a payment with a card using the FlutterPaymob instance
- //
+
+ // await Get.find()
+ // .payWithPayMob(context, '1100', 'EGP');
+ // Initiates a payment with a card using the FlutterPaymob instance
// },
// icon: const Icon(
// // Get.put(AudioRecorderController()).isRecording