This commit is contained in:
Hamza Aleghwairyeen
2024-03-27 12:01:28 +03:00
parent 0f79b2d86b
commit eb67f93e71
13 changed files with 304 additions and 171 deletions

1
.gitignore vendored
View File

@@ -30,6 +30,7 @@ migrate_working_dir/
.packages
.pub-cache/
.pub/
.env
/build/
# Symbolication related

View File

@@ -21,6 +21,6 @@
<key>CFBundleVersion</key>
<string>1.0</string>
<key>MinimumOSVersion</key>
<string>11.0</string>
<string>12.0</string>
</dict>
</plist>

View File

@@ -1,4 +1,38 @@
PODS:
- agora_rtc_engine (6.2.6):
- AgoraIrisRTC_iOS (= 4.2.6-build.3)
- AgoraRtcEngine_iOS (= 4.2.6)
- Flutter
- AgoraIrisRTC_iOS (4.2.6-build.3)
- AgoraRtcEngine_iOS (4.2.6):
- AgoraRtcEngine_iOS/AIAEC (= 4.2.6)
- AgoraRtcEngine_iOS/AINS (= 4.2.6)
- AgoraRtcEngine_iOS/AudioBeauty (= 4.2.6)
- AgoraRtcEngine_iOS/ClearVision (= 4.2.6)
- AgoraRtcEngine_iOS/ContentInspect (= 4.2.6)
- AgoraRtcEngine_iOS/DRM (= 4.2.6)
- AgoraRtcEngine_iOS/FaceDetection (= 4.2.6)
- AgoraRtcEngine_iOS/ReplayKit (= 4.2.6)
- AgoraRtcEngine_iOS/RtcBasic (= 4.2.6)
- AgoraRtcEngine_iOS/SpatialAudio (= 4.2.6)
- AgoraRtcEngine_iOS/VideoCodecDec (= 4.2.6)
- AgoraRtcEngine_iOS/VideoCodecEnc (= 4.2.6)
- AgoraRtcEngine_iOS/VirtualBackground (= 4.2.6)
- AgoraRtcEngine_iOS/VQA (= 4.2.6)
- AgoraRtcEngine_iOS/AIAEC (4.2.6)
- AgoraRtcEngine_iOS/AINS (4.2.6)
- AgoraRtcEngine_iOS/AudioBeauty (4.2.6)
- AgoraRtcEngine_iOS/ClearVision (4.2.6)
- AgoraRtcEngine_iOS/ContentInspect (4.2.6)
- AgoraRtcEngine_iOS/DRM (4.2.6)
- AgoraRtcEngine_iOS/FaceDetection (4.2.6)
- AgoraRtcEngine_iOS/ReplayKit (4.2.6)
- AgoraRtcEngine_iOS/RtcBasic (4.2.6)
- AgoraRtcEngine_iOS/SpatialAudio (4.2.6)
- AgoraRtcEngine_iOS/VideoCodecDec (4.2.6)
- AgoraRtcEngine_iOS/VideoCodecEnc (4.2.6)
- AgoraRtcEngine_iOS/VirtualBackground (4.2.6)
- AgoraRtcEngine_iOS/VQA (4.2.6)
- AppAuth (1.6.2):
- AppAuth/Core (= 1.6.2)
- AppAuth/ExternalUserAgent (= 1.6.2)
@@ -7,6 +41,8 @@ PODS:
- AppAuth/Core
- audio_session (0.0.1):
- Flutter
- background_location (0.0.1):
- Flutter
- camera_avfoundation (0.0.1):
- Flutter
- device_info_plus (0.0.1):
@@ -48,6 +84,8 @@ PODS:
- Flutter
- flutter_secure_storage (6.0.0):
- Flutter
- flutter_tts (0.0.1):
- Flutter
- FMDB (2.7.5):
- FMDB/standard (= 2.7.5)
- FMDB/standard (2.7.5)
@@ -124,6 +162,8 @@ PODS:
- TOCropViewController (~> 2.6.1)
- image_picker_ios (0.0.1):
- Flutter
- iris_method_channel (0.0.1):
- Flutter
- just_audio (0.0.1):
- Flutter
- local_auth_ios (0.0.1):
@@ -162,6 +202,8 @@ PODS:
- path_provider_foundation (0.0.1):
- Flutter
- FlutterMacOS
- permission_handler_apple (9.3.0):
- Flutter
- PromisesObjC (2.3.1)
- sqflite (0.0.3):
- Flutter
@@ -205,6 +247,8 @@ PODS:
- TOCropViewController (2.6.1)
- url_launcher_ios (0.0.1):
- Flutter
- vibration (1.7.5):
- Flutter
- video_player_avfoundation (0.0.1):
- Flutter
- FlutterMacOS
@@ -214,7 +258,9 @@ PODS:
- Flutter
DEPENDENCIES:
- agora_rtc_engine (from `.symlinks/plugins/agora_rtc_engine/ios`)
- audio_session (from `.symlinks/plugins/audio_session/ios`)
- background_location (from `.symlinks/plugins/background_location/ios`)
- camera_avfoundation (from `.symlinks/plugins/camera_avfoundation/ios`)
- device_info_plus (from `.symlinks/plugins/device_info_plus/ios`)
- firebase_core (from `.symlinks/plugins/firebase_core/ios`)
@@ -222,6 +268,7 @@ DEPENDENCIES:
- Flutter (from `Flutter`)
- flutter_local_notifications (from `.symlinks/plugins/flutter_local_notifications/ios`)
- flutter_secure_storage (from `.symlinks/plugins/flutter_secure_storage/ios`)
- flutter_tts (from `.symlinks/plugins/flutter_tts/ios`)
- geolocator_apple (from `.symlinks/plugins/geolocator_apple/ios`)
- google_maps_flutter_ios (from `.symlinks/plugins/google_maps_flutter_ios/ios`)
- google_mlkit_commons (from `.symlinks/plugins/google_mlkit_commons/ios`)
@@ -229,20 +276,25 @@ DEPENDENCIES:
- google_sign_in_ios (from `.symlinks/plugins/google_sign_in_ios/ios`)
- image_cropper (from `.symlinks/plugins/image_cropper/ios`)
- image_picker_ios (from `.symlinks/plugins/image_picker_ios/ios`)
- iris_method_channel (from `.symlinks/plugins/iris_method_channel/ios`)
- just_audio (from `.symlinks/plugins/just_audio/ios`)
- local_auth_ios (from `.symlinks/plugins/local_auth_ios/ios`)
- location (from `.symlinks/plugins/location/ios`)
- package_info_plus (from `.symlinks/plugins/package_info_plus/ios`)
- path_provider_foundation (from `.symlinks/plugins/path_provider_foundation/darwin`)
- permission_handler_apple (from `.symlinks/plugins/permission_handler_apple/ios`)
- sqflite (from `.symlinks/plugins/sqflite/ios`)
- stripe_ios (from `.symlinks/plugins/stripe_ios/ios`)
- url_launcher_ios (from `.symlinks/plugins/url_launcher_ios/ios`)
- vibration (from `.symlinks/plugins/vibration/ios`)
- video_player_avfoundation (from `.symlinks/plugins/video_player_avfoundation/darwin`)
- wakelock_plus (from `.symlinks/plugins/wakelock_plus/ios`)
- webview_flutter_wkwebview (from `.symlinks/plugins/webview_flutter_wkwebview/ios`)
SPEC REPOS:
trunk:
- AgoraIrisRTC_iOS
- AgoraRtcEngine_iOS
- AppAuth
- Firebase
- FirebaseCore
@@ -277,8 +329,12 @@ SPEC REPOS:
- TOCropViewController
EXTERNAL SOURCES:
agora_rtc_engine:
:path: ".symlinks/plugins/agora_rtc_engine/ios"
audio_session:
:path: ".symlinks/plugins/audio_session/ios"
background_location:
:path: ".symlinks/plugins/background_location/ios"
camera_avfoundation:
:path: ".symlinks/plugins/camera_avfoundation/ios"
device_info_plus:
@@ -293,6 +349,8 @@ EXTERNAL SOURCES:
:path: ".symlinks/plugins/flutter_local_notifications/ios"
flutter_secure_storage:
:path: ".symlinks/plugins/flutter_secure_storage/ios"
flutter_tts:
:path: ".symlinks/plugins/flutter_tts/ios"
geolocator_apple:
:path: ".symlinks/plugins/geolocator_apple/ios"
google_maps_flutter_ios:
@@ -307,6 +365,8 @@ EXTERNAL SOURCES:
:path: ".symlinks/plugins/image_cropper/ios"
image_picker_ios:
:path: ".symlinks/plugins/image_picker_ios/ios"
iris_method_channel:
:path: ".symlinks/plugins/iris_method_channel/ios"
just_audio:
:path: ".symlinks/plugins/just_audio/ios"
local_auth_ios:
@@ -317,12 +377,16 @@ EXTERNAL SOURCES:
:path: ".symlinks/plugins/package_info_plus/ios"
path_provider_foundation:
:path: ".symlinks/plugins/path_provider_foundation/darwin"
permission_handler_apple:
:path: ".symlinks/plugins/permission_handler_apple/ios"
sqflite:
:path: ".symlinks/plugins/sqflite/ios"
stripe_ios:
:path: ".symlinks/plugins/stripe_ios/ios"
url_launcher_ios:
:path: ".symlinks/plugins/url_launcher_ios/ios"
vibration:
:path: ".symlinks/plugins/vibration/ios"
video_player_avfoundation:
:path: ".symlinks/plugins/video_player_avfoundation/darwin"
wakelock_plus:
@@ -331,8 +395,12 @@ EXTERNAL SOURCES:
:path: ".symlinks/plugins/webview_flutter_wkwebview/ios"
SPEC CHECKSUMS:
agora_rtc_engine: 5b2a7c221e1f3dfb8dee0fb0659f269be24fa81b
AgoraIrisRTC_iOS: 8346499b82968a4967e3d0bec2cf14bf7c0c3f76
AgoraRtcEngine_iOS: ac647332ad8f86d79cf810601c9e62b28c3a4de0
AppAuth: 3bb1d1cd9340bd09f5ed189fb00b1cc28e1e8570
audio_session: 4f3e461722055d21515cf3261b64c973c062f345
background_location: 1b80c1fe3abd9912bca298618f6e365abf6f588f
camera_avfoundation: 3125e8cd1a4387f6f31c6c63abb8a55892a9eeeb
device_info_plus: c6fb39579d0f423935b0c9ce7ee2f44b71b9fce6
Firebase: 414ad272f8d02dfbf12662a9d43f4bba9bec2a06
@@ -342,9 +410,10 @@ SPEC CHECKSUMS:
FirebaseCoreInternal: b444828ea7cfd594fca83046b95db98a2be4f290
FirebaseInstallations: 033d199474164db20c8350736842a94fe717b960
FirebaseMessaging: 9bc34a98d2e0237e1b121915120d4d48ddcf301e
Flutter: f04841e97a9d0b0a8025694d0796dd46242b2854
Flutter: e0871f40cf51350855a761d2e70bf5af5b9b5de7
flutter_local_notifications: 0c0b1ae97e741e1521e4c1629a459d04b9aec743
flutter_secure_storage: 23fc622d89d073675f2eaa109381aefbcf5a49be
flutter_tts: 0f492aab6accf87059b72354fcb4ba934304771d
FMDB: 2ce00b547f966261cd18927a3ddb07cb6f3db82a
geolocator_apple: cc556e6844d508c95df1e87e3ea6fa4e58c50401
google_maps_flutter_ios: 590249c67f34f422122c232f2a626192adbc78ee
@@ -362,6 +431,7 @@ SPEC CHECKSUMS:
GTMSessionFetcher: 3a63d75eecd6aa32c2fc79f578064e1214dfdec2
image_cropper: a3291c624a953049bc6a02e1f8c8ceb162a24b25
image_picker_ios: 4a8aadfbb6dc30ad5141a2ce3832af9214a705b5
iris_method_channel: 0617c689164d8154c020c50f63ca79f92b8a7b9d
just_audio: baa7252489dbcf47a4c7cc9ca663e9661c99aafa
local_auth_ios: c6cf091ded637a88f24f86a8875d8b0f526e2605
location: d5cf8598915965547c3f36761ae9cc4f4e87d22e
@@ -373,6 +443,7 @@ SPEC CHECKSUMS:
nanopb: d4d75c12cd1316f4a64e3c6963f879ecd4b5e0d5
package_info_plus: 115f4ad11e0698c8c1c5d8a689390df880f47e85
path_provider_foundation: 29f094ae23ebbca9d3d0cec13889cd9060c0e943
permission_handler_apple: 036b856153a2b1f61f21030ff725f3e6fece2b78
PromisesObjC: c50d2056b5253dadbd6c2bea79b0674bd5a52fa4
sqflite: 31f7eba61e3074736dff8807a9b41581e4f7f15a
Stripe: e046335ab6e3f25d39f1a55bd98620a85269cffa
@@ -386,10 +457,11 @@ SPEC CHECKSUMS:
StripeUICore: 090c4fe916d039616ce8f8de30392f4aeb33dd16
TOCropViewController: edfd4f25713d56905ad1e0b9f5be3fbe0f59c863
url_launcher_ios: bf5ce03e0e2088bad9cc378ea97fa0ed5b49673b
vibration: 7d883d141656a1c1a6d8d238616b2042a51a1241
video_player_avfoundation: e9e6f9cae7d7a6d9b43519b0aab382bca60fcfd1
wakelock_plus: 8b09852c8876491e4b6d179e17dfe2a0b5f60d47
webview_flutter_wkwebview: 2e2d318f21a5e036e2c3f26171342e95908bd60a
PODFILE CHECKSUM: 5dc3f53762f32b09fb6dbb6df4a961ce126c0d90
COCOAPODS: 1.13.0
COCOAPODS: 1.15.2

View File

@@ -226,7 +226,8 @@
97C146E61CF9000F007C117D /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 1430;
BuildIndependentTargetsInParallel = YES;
LastUpgradeCheck = 1510;
ORGANIZATIONNAME = "";
TargetAttributes = {
331C8080294A63A400263BE5 = {
@@ -465,6 +466,7 @@
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
@@ -475,6 +477,7 @@
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_USER_SCRIPT_SANDBOXING = NO;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_NO_COMMON_BLOCKS = YES;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
@@ -483,7 +486,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SUPPORTED_PLATFORMS = iphoneos;
@@ -503,7 +506,8 @@
DEVELOPMENT_TEAM = 63CVT8G5P8;
ENABLE_BITCODE = NO;
INFOPLIST_FILE = Runner/Info.plist;
INFOPLIST_KEY_CFBundleDisplayName = Ride;
INFOPLIST_KEY_CFBundleDisplayName = Sefer;
INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.travel";
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
@@ -589,6 +593,7 @@
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
@@ -599,6 +604,7 @@
DEBUG_INFORMATION_FORMAT = dwarf;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
ENABLE_USER_SCRIPT_SANDBOXING = NO;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_DYNAMIC_NO_PIC = NO;
GCC_NO_COMMON_BLOCKS = YES;
@@ -613,7 +619,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
@@ -644,6 +650,7 @@
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
@@ -654,6 +661,7 @@
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_USER_SCRIPT_SANDBOXING = NO;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_NO_COMMON_BLOCKS = YES;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
@@ -662,7 +670,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SUPPORTED_PLATFORMS = iphoneos;
@@ -684,7 +692,8 @@
DEVELOPMENT_TEAM = 63CVT8G5P8;
ENABLE_BITCODE = NO;
INFOPLIST_FILE = Runner/Info.plist;
INFOPLIST_KEY_CFBundleDisplayName = Ride;
INFOPLIST_KEY_CFBundleDisplayName = Sefer;
INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.travel";
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
@@ -709,7 +718,8 @@
DEVELOPMENT_TEAM = 63CVT8G5P8;
ENABLE_BITCODE = NO;
INFOPLIST_FILE = Runner/Info.plist;
INFOPLIST_KEY_CFBundleDisplayName = Ride;
INFOPLIST_KEY_CFBundleDisplayName = Sefer;
INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.travel";
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",

View File

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1430"
LastUpgradeVersion = "1510"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"

View File

@@ -2,44 +2,16 @@
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>GMSApiKey</key>
<string>YOUR_API_KEY</string>
<key>NSPhotoLibraryUsageDescription</key>
<string>Explanation of why your app needs access to the photo library.</string>
<key>NSFaceIDUsageDescription</key>
<string>Use Face ID to securely authenticate payment accounts.</string>
<key>NSLocationAlwaysUsageDescription</key>
<string>This app needs access to location.</string>
<key>UIBackgroundModes</key>
<array>
<string>fetch</string>
<string>location</string>
</array>
<key>NSMicrophoneUsageDescription</key>
<string>This app requires access to your microphone to record audio, allowing you to add voice recordings to your photos and videos and access to connect to a call.</string>
<key>NSCameraUsageDescription</key>
<string>Sefer app requires access to your camera in order to scan QR codes and capture images for uploading and access to connect to a call.</string>
<key>NSLocationAlwaysAndWhenInUseUsageDescription</key>
<string>This app needs access to your location to provide you with the best ride experience. Your location data will be used to find the nearest available cars and connect you with the closest captain for efficient and convenient rides.</string>
<key>FirebaseAppDelegateProxyEnabled</key>
<string>NO</string>
<key>CFBundleGetInfoString</key>
<string></string>
<key>LSApplicationCategoryType</key>
<string></string>
<key>CADisableMinimumFrameDurationOnPhone</key>
<true/>
<key>CFBundleDevelopmentRegion</key>
<string>$(DEVELOPMENT_LANGUAGE)</string>
<key>CFBundleDisplayName</key>
<string>Sefer</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleGetInfoString</key>
<string></string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
@@ -54,8 +26,36 @@
<string>????</string>
<key>CFBundleVersion</key>
<string>1.37</string>
<key>FirebaseAppDelegateProxyEnabled</key>
<string>NO</string>
<key>GMSApiKey</key>
<string>YOUR_API_KEY</string>
<key>LSApplicationCategoryType</key>
<string></string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>NSCameraUsageDescription</key>
<string>Sefer app requires access to your camera in order to scan QR codes and capture images for uploading and access to connect to a call.</string>
<key>NSFaceIDUsageDescription</key>
<string>Use Face ID to securely authenticate payment accounts.</string>
<key>NSLocationAlwaysAndWhenInUseUsageDescription</key>
<string>This app needs access to your location to provide you with the best ride experience. Your location data will be used to find the nearest available cars and connect you with the closest captain for efficient and convenient rides.</string>
<key>NSLocationAlwaysUsageDescription</key>
<string>This app needs access to location.</string>
<key>NSLocationWhenInUseUsageDescription</key>
<string>This app needs access to your location to provide you with the best ride experience. Your location data will be used to find the nearest available cars and connect you with the closest captain for efficient and convenient rides.</string>
<key>NSMicrophoneUsageDescription</key>
<string>This app requires access to your microphone to record audio, allowing you to add voice recordings to your photos and videos and access to connect to a call.</string>
<key>NSPhotoLibraryUsageDescription</key>
<string>Explanation of why your app needs access to the photo library.</string>
<key>UIApplicationSupportsIndirectInputEvents</key>
<true/>
<key>UIBackgroundModes</key>
<array>
<string>fetch</string>
<string>location</string>
<string>remote-notification</string>
</array>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>UIMainStoryboardFile</key>
@@ -75,11 +75,5 @@
</array>
<key>UIViewControllerBasedStatusBarAppearance</key>
<false/>
<key>CADisableMinimumFrameDurationOnPhone</key>
<true/>
<key>UIApplicationSupportsIndirectInputEvents</key>
<true/>
<key>NSLocationWhenInUseUsageDescription</key>
<string>This app needs access to your location to provide you with the best ride experience. Your location data will be used to find the nearest available cars and connect you with the closest captain for efficient and convenient rides.</string>
</dict>
</plist>

View File

@@ -127,6 +127,7 @@ class AppLink {
// =====================================
static String addRateToPassenger = "$ride/rate/add.php";
static String addRateToDriver = "$ride/rate/addRateToDriver.php";
static String getDriveRrate = "$ride/rate/getDriveRrate.php";
////////////////emails ============//
static String sendEmailToPassengerForTripDetails =

View File

@@ -0,0 +1,34 @@
import 'package:geolocator/geolocator.dart';
class GeoLocation {
Future<Position> getCurrentLocation() async {
bool serviceEnabled;
LocationPermission permission;
// Check if location services are enabled.
serviceEnabled = await Geolocator.isLocationServiceEnabled();
if (!serviceEnabled) {
// Location services are not enabled, so we request the user to enable it.
return Future.error('Location services are disabled.');
}
permission = await Geolocator.checkPermission();
if (permission == LocationPermission.denied) {
permission = await Geolocator.requestPermission();
if (permission == LocationPermission.denied) {
// Permissions are denied, we cannot fetch the location.
return Future.error('Location permissions are denied');
}
}
if (permission == LocationPermission.deniedForever) {
// Permissions are denied forever, we cannot request permissions.
return Future.error(
'Location permissions are permanently denied, we cannot request permissions.');
}
// When we reach here, permissions are granted and we can fetch the location.
return await Geolocator.getCurrentPosition(
desiredAccuracy: LocationAccuracy.high);
}
}

View File

@@ -60,6 +60,7 @@
// ''');
// });
// } else {
// await Permission.locationAlways.request();
// print('Location permission not granted');
// }
// }

View File

@@ -1,7 +1,6 @@
import 'dart:async';
import 'package:SEFER/constant/table_names.dart';
import 'package:SEFER/controller/home/captin/map_driver_controller.dart';
import 'package:get/get.dart';
import 'package:google_maps_flutter/google_maps_flutter.dart';
import 'package:location/location.dart';
@@ -10,23 +9,26 @@ import 'package:SEFER/constant/links.dart';
import 'package:SEFER/controller/functions/crud.dart';
import 'package:SEFER/controller/home/payment/captain_wallet_controller.dart';
import 'package:SEFER/main.dart';
import 'package:permission_handler/permission_handler.dart';
import '../home/captin/map_driver_controller.dart';
// LocationController.dart
class LocationController extends GetxController {
LocationData? _currentLocation;
late Location location;
bool isLoading = false;
bool isActive = false;
late LatLng myLocation;
late double heading;
late double accuracy;
late double heading = 0;
late double accuracy = 0;
LatLng? previousLocation;
late double latitude;
late double totalDistance;
late double longitude;
late DateTime time;
late double speed;
late double speedAccuracy;
late double headingAccuracy;
late double speed = 0;
late double speedAccuracy = 0;
late double headingAccuracy = 0;
bool isActive = false;
late LatLng myLocation;
String totalPoints = '0';
LocationData? get currentLocation => _currentLocation;
Timer? _locationTimer;
@@ -34,9 +36,6 @@ class LocationController extends GetxController {
@override
void onInit() async {
super.onInit();
requestLocationPermission();
location = Location();
getLocation();
// startLocationUpdates();
@@ -44,20 +43,6 @@ class LocationController extends GetxController {
totalPoints = Get.put(CaptainWalletController()).totalPoints;
}
Future<void> requestLocationPermission() async {
if (box.read(BoxName.driverID) != null) {
var status = await Permission.locationAlways.status;
if (!status.isGranted) {
await Permission.locationAlways.request();
} else {
var status = await Permission.locationWhenInUse.status;
if (!status.isGranted) {
await Permission.locationWhenInUse.request();
}
}
}
}
Future<void> startLocationUpdates() async {
if (box.read(BoxName.driverID) != null) {
_locationTimer =
@@ -70,7 +55,7 @@ class LocationController extends GetxController {
print('total point is $totalPoints');
await getLocation();
if (box.read(BoxName.driverID) != null) {
// if (box.read(BoxName.driverID) != null) {
await CRUD()
.post(link: AppLink.addCarsLocationByPassenger, payload: {
'driver_id': box.read(BoxName.driverID).toString(),
@@ -95,7 +80,7 @@ class LocationController extends GetxController {
'lng': myLocation.longitude.toString(),
}, TableName.rideLocation);
}
}
// }
//
}
@@ -114,32 +99,54 @@ class LocationController extends GetxController {
}
Future<void> getLocation() async {
isLoading = true;
update();
// isLoading = true;
// update();
bool serviceEnabled;
PermissionStatus permissionGranted;
// Check if location services are enabled
serviceEnabled = await location.serviceEnabled();
if (!serviceEnabled) {
serviceEnabled = await location.requestService();
if (!serviceEnabled) {
// Location services are still not enabled, handle the error
return;
}
}
// 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();
myLocation = LatLng(_locationData.latitude!, _locationData.longitude!);
accuracy = _locationData.accuracy!;
latitude = _locationData.latitude!;
longitude = _locationData.longitude!;
heading = _locationData.heading!;
speed = _locationData.speed!;
speedAccuracy = _locationData.speedAccuracy!;
headingAccuracy = _locationData.headingAccuracy!;
myLocation =
(_locationData.latitude != null && _locationData.longitude != null
? LatLng(_locationData.latitude!, _locationData.longitude!)
: null)!;
// Calculate the distance between the current location and the previous location
if (previousLocation != null) {
// double distance = myLocation.distanceBetween(previousLocation);
// totalDistance += distance;
}
previousLocation = myLocation;
// Print location details
// print('myLocation: $myLocation');
// print('Accuracy: $accuracy');
// print('Latitude: $latitude');
// print('Longitude: $longitude');
// print('heading: $heading');
// print('speed: $speed');
// print('speedAccuracy: $speedAccuracy');
// print('headingAccuracy: $headingAccuracy');
isLoading = false;
// print('myLocation: ${myLocation}');
// print('Accuracy: ${_locationData.accuracy}');
// print('Latitude: ${_locationData.latitude}');
// print('Longitude: ${_locationData.longitude}');
// print('Time: ${_locationData.time}');
// isLoading = false;
update();
}
}

View File

@@ -201,6 +201,7 @@ class HomeCaptainController extends GetxController {
await getlocation();
onButtonSelected();
await getPaymentToday();
await getDriverRate();
getCountRideToday();
getAllPayment();
startPeriodicExecution();
@@ -226,7 +227,7 @@ class HomeCaptainController extends GetxController {
payload: {'driverID': box.read(BoxName.driverID).toString()});
data = jsonDecode(res);
totalMoneyToday = data['message'][0]['todayAmount'];
rating = data['message'][0]['rating'].toString();
update();
}
@@ -241,6 +242,16 @@ class HomeCaptainController extends GetxController {
update();
}
getDriverRate() async {
var res = await CRUD().get(
link: AppLink.getDriveRrate,
payload: {'driver_id': box.read(BoxName.driverID).toString()});
data = jsonDecode(res);
rating = data['message'][0]['rating'].toString();
update();
}
getAllPayment() async {
var res = await CRUD().get(
link: AppLink.getAllPaymentFromRide,

View File

@@ -1016,7 +1016,7 @@ class MapPassengerController extends GetxController {
update();
}
Future<String> getRideStatus(int rideId) async {
Future<String> getRideStatus(String rideId) async {
final response = await CRUD()
.get(link: AppLink.getRideStatus, payload: {'order_id': rideId});
@@ -1026,9 +1026,10 @@ class MapPassengerController extends GetxController {
late String driverCarModel, driverCarMake, driverLicensePlate, driverName;
getUpdatedRideForDriverApply(String rideId) async {
// if (isDriversTokensSend) {
final response =
final res =
await CRUD().get(link: AppLink.getRideOrderID, payload: {'id': rideId});
if (response != 'failure') {
if (res != 'failure') {
var response = jsonDecode(res);
driverId = response['data']['driver_id'];
driverPhone = response['data']['phone'];
driverCarMake = response['data']['make'];

View File

@@ -1,6 +1,5 @@
import 'dart:io';
import 'package:SEFER/constant/box_name.dart';
import 'package:background_location/background_location.dart';
import 'package:firebase_core/firebase_core.dart';
import 'package:firebase_messaging/firebase_messaging.dart';
@@ -16,7 +15,7 @@ import 'constant/credential.dart';
import 'constant/info.dart';
import 'controller/firebase/firbase_messge.dart';
import 'controller/firebase/local_notification.dart';
import 'controller/functions/location_background_controller.dart';
import 'controller/functions/location_controller.dart';
import 'controller/local/local_controller.dart';
import 'controller/local/translations.dart';
import 'firebase_options.dart';
@@ -44,7 +43,7 @@ Future<void> backgroundMessageHandler(RemoteMessage message) async {
void main() async {
WidgetsFlutterBinding.ensureInitialized();
WakelockPlus.enable();
await BackgroundLocation.startLocationService();
// await LocationController().startLocationUpdates();
if (Platform.isAndroid) {
await NotificationController().initNotifications();
}
@@ -71,6 +70,8 @@ void main() async {
List<Future> initializationTasks = [
FirebaseMessagesController().getNotificationSettings(),
FirebaseMessagesController().getToken(),
// Get.put(LocationController()).startLocationUpdates(),
// Get.put(LocationBackgroundController()).startBackLocation(),
];
// cameras = await availableCameras();
await Future.wait(initializationTasks);