25-1/28/1
1
.env
@@ -48,6 +48,7 @@ payMobOutClient_id='Z05ut48dVkS2gI2zenFFcKsfDKfHAU0WELqKyJ0LXrXlBl'
|
|||||||
payMobOutPassword='D2zJFxkE#LN3vz38z2dYxpNfWXrXlBl'
|
payMobOutPassword='D2zJFxkE#LN3vz38z2dYxpNfWXrXlBl'
|
||||||
payMobOutUserName='zjujl_qvo_fwjfgjlXrXlBl'
|
payMobOutUserName='zjujl_qvo_fwjfgjlXrXlBl'
|
||||||
keyOfApp=nqryjp@1737wqnmqqsjyzjujljksvceiXrXlBl
|
keyOfApp=nqryjp@1737wqnmqqsjyzjujljksvceiXrXlBl
|
||||||
|
initializationVector=abcdefghijklmnop
|
||||||
privateKeyFCM="-----BEGIN PRIVATE KEY-----\\nMIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQD0zH9TQGDQHUv3\\na3/JAD1UKPwAp3wNKT0a6fxiIzjI3JxQWI30QvZCcfl6CdMhIcydX1ncSaYTcEeC\\n/AdPVCPkqyJx1YIGGg6P/mRzCWeaN8fsp6z250m5vcObDCZc3dbJEkepbep+6FPY\\n21m3KO+AHh1glgsTGZOTm5xiU8NGXpdk2QEh8wpiIIlR/HuKwVw9g8urNe3Sno+U\\nDm3z37iFqvZdmpqO8aWTJu6beb3hsREK9XK2I9JqC2JUwiGQRo3idOvPP6hkqrWx\\nKSX96vglQFYfakvJdDp2ZATOlpBYPMtS/IWhJ985u58TSS+Kl8qpnpaZBSxgJirf\\nhWzhnKLfAgMBAAECggEAJP785SePGhS7ZN6ltspm+l+hSjYFrPWFCxq+rlQ1YkHZ\\nC9l+RqKSFhOkiPmQI2s4wbXl3kFxLHHlFNoi/q2wKQBmGb8TQfnRJpjjNHGA61Ev\\n0Ue7/6qPvVb9B2MsLw/FxKiTFPuMG3bgKR9pbSFuJLYoaW7zqITOhVnYphGTqwAY\\nBVVcvISSLvELDmH9VZcv/9DVqVlqbbESHWh1Z4W6XGPoEqeDH/upNTyQQ/46Msgm\\nTGE6VqLHpWuSf6SqHp+r0Y0lI3vIPM1vz5FAJDJbOE/enHa0fSup0OHSMxl0HVMn\\nnO1yrGF3vsIPOej5HKr5d71bEIckzk73/yjNC1/mDQKBgQD7RtUvc9omsSsFMJ6e\\nBASAn6Dktx/QY/XNJjFzHQj69cywLDe5t5AL2gUi3phQ2oqB5XJdwnd5bTIEPEPZ\\nDOuOai2802p6FJk6kjmZAMVGx5JtXBH+vs6jrmQQSMiKbjwN1TT6xIWakvLOonUi\\nX6ZvjYYjU/E0YJU3jSiXWEr76wKBgQD5Zn4SouJ6BCDZMbausJVMBkk3qxsYooip\\np89WakC6e7AZinpkRcqjGGV9GOvc8crJs6fyXAA9ORepGP47Mc0ZrDssOkstznsM\\npr8R0S6MKwEZaT9ixOHdOcLZ47ps+JzA2Wr4KN2OvFHksUkB/46ATD1j9WZVgB8M\\namsYp/Y73QKBgHOo+PvsoZ9psVmkNX6abtAdqdtdB0HOoRea2uwXk0ig12TIFaZg\\nfedWpUKVnxqoXVTJHklV99RmlL0qWDiSH+LfsMnXro0e6iDxqZ1po2Se/CFmXcoa\\nXdctsFVmixhdATuExewfhTfPKABA+xWlXWC/jdy5CK+JPWXijaqMM4edAoGAE5Bj\\nsWiPpYyvWvpYX0nA3G7dzX0hqgQN/mkIjbnWDArp3IcNZNJIvBSM2Yxb7EAXbU0n\\njo6DAkp5Pa2VO+WDNlFZbvW/sf8xjeOCt44WPa6d7nVgIIpbQXRngZoopKW3/jTP\\n/FmQT8McFXmGxZ5belsAsdetSGW9icbLUerTGQ0CgYEAmf/G8Ag3XxmqTXvvHuv2\\n14OP7WnrVqkEMnydrftEwn4peXd/Lz+/GYX5Zc4ZoNgbN8IvZ5z0+OmRsallsbiW\\nBw0/tc68CjzxXOvReWxDluUopqWVGj5tlGqE5xUDku9SWJSxbkiQ3rqutzBdPXpr\\noqHwPyDrmK/Zgqn+uiIm4Ck=\\n-----END PRIVATE KEY-----\\n"
|
privateKeyFCM="-----BEGIN PRIVATE KEY-----\\nMIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQD0zH9TQGDQHUv3\\na3/JAD1UKPwAp3wNKT0a6fxiIzjI3JxQWI30QvZCcfl6CdMhIcydX1ncSaYTcEeC\\n/AdPVCPkqyJx1YIGGg6P/mRzCWeaN8fsp6z250m5vcObDCZc3dbJEkepbep+6FPY\\n21m3KO+AHh1glgsTGZOTm5xiU8NGXpdk2QEh8wpiIIlR/HuKwVw9g8urNe3Sno+U\\nDm3z37iFqvZdmpqO8aWTJu6beb3hsREK9XK2I9JqC2JUwiGQRo3idOvPP6hkqrWx\\nKSX96vglQFYfakvJdDp2ZATOlpBYPMtS/IWhJ985u58TSS+Kl8qpnpaZBSxgJirf\\nhWzhnKLfAgMBAAECggEAJP785SePGhS7ZN6ltspm+l+hSjYFrPWFCxq+rlQ1YkHZ\\nC9l+RqKSFhOkiPmQI2s4wbXl3kFxLHHlFNoi/q2wKQBmGb8TQfnRJpjjNHGA61Ev\\n0Ue7/6qPvVb9B2MsLw/FxKiTFPuMG3bgKR9pbSFuJLYoaW7zqITOhVnYphGTqwAY\\nBVVcvISSLvELDmH9VZcv/9DVqVlqbbESHWh1Z4W6XGPoEqeDH/upNTyQQ/46Msgm\\nTGE6VqLHpWuSf6SqHp+r0Y0lI3vIPM1vz5FAJDJbOE/enHa0fSup0OHSMxl0HVMn\\nnO1yrGF3vsIPOej5HKr5d71bEIckzk73/yjNC1/mDQKBgQD7RtUvc9omsSsFMJ6e\\nBASAn6Dktx/QY/XNJjFzHQj69cywLDe5t5AL2gUi3phQ2oqB5XJdwnd5bTIEPEPZ\\nDOuOai2802p6FJk6kjmZAMVGx5JtXBH+vs6jrmQQSMiKbjwN1TT6xIWakvLOonUi\\nX6ZvjYYjU/E0YJU3jSiXWEr76wKBgQD5Zn4SouJ6BCDZMbausJVMBkk3qxsYooip\\np89WakC6e7AZinpkRcqjGGV9GOvc8crJs6fyXAA9ORepGP47Mc0ZrDssOkstznsM\\npr8R0S6MKwEZaT9ixOHdOcLZ47ps+JzA2Wr4KN2OvFHksUkB/46ATD1j9WZVgB8M\\namsYp/Y73QKBgHOo+PvsoZ9psVmkNX6abtAdqdtdB0HOoRea2uwXk0ig12TIFaZg\\nfedWpUKVnxqoXVTJHklV99RmlL0qWDiSH+LfsMnXro0e6iDxqZ1po2Se/CFmXcoa\\nXdctsFVmixhdATuExewfhTfPKABA+xWlXWC/jdy5CK+JPWXijaqMM4edAoGAE5Bj\\nsWiPpYyvWvpYX0nA3G7dzX0hqgQN/mkIjbnWDArp3IcNZNJIvBSM2Yxb7EAXbU0n\\njo6DAkp5Pa2VO+WDNlFZbvW/sf8xjeOCt44WPa6d7nVgIIpbQXRngZoopKW3/jTP\\n/FmQT8McFXmGxZ5belsAsdetSGW9icbLUerTGQ0CgYEAmf/G8Ag3XxmqTXvvHuv2\\n14OP7WnrVqkEMnydrftEwn4peXd/Lz+/GYX5Zc4ZoNgbN8IvZ5z0+OmRsallsbiW\\nBw0/tc68CjzxXOvReWxDluUopqWVGj5tlGqE5xUDku9SWJSxbkiQ3rqutzBdPXpr\\noqHwPyDrmK/Zgqn+uiIm4Ck=\\n-----END PRIVATE KEY-----\\n"
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -61,8 +61,8 @@ android {
|
|||||||
// For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration.
|
// For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration.
|
||||||
minSdk = 23
|
minSdk = 23
|
||||||
targetSdk = flutter.targetSdkVersion
|
targetSdk = flutter.targetSdkVersion
|
||||||
versionCode = 112
|
versionCode = 113
|
||||||
versionName = '1.6.112'
|
versionName = '1.6.113'
|
||||||
multiDexEnabled =true
|
multiDexEnabled =true
|
||||||
|
|
||||||
// manifestPlaceholders can be specified here if needed
|
// manifestPlaceholders can be specified here if needed
|
||||||
|
|||||||
@@ -21,7 +21,7 @@
|
|||||||
<uses-feature android:name="android.hardware.camera.autofocus" />
|
<uses-feature android:name="android.hardware.camera.autofocus" />
|
||||||
|
|
||||||
<application
|
<application
|
||||||
android:label="SEFER"
|
android:label="SPEED"
|
||||||
android:name="${applicationName}"
|
android:name="${applicationName}"
|
||||||
android:icon="@mipmap/launcher_icon">
|
android:icon="@mipmap/launcher_icon">
|
||||||
<activity
|
<activity
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 61 KiB After Width: | Height: | Size: 105 KiB |
|
Before Width: | Height: | Size: 544 B |
|
Before Width: | Height: | Size: 4.2 KiB After Width: | Height: | Size: 7.3 KiB |
|
Before Width: | Height: | Size: 442 B |
|
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 4.1 KiB |
|
Before Width: | Height: | Size: 721 B |
|
Before Width: | Height: | Size: 6.6 KiB After Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 1.0 KiB |
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 18 KiB |
|
Before Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 28 KiB |
|
Before Width: | Height: | Size: 61 KiB After Width: | Height: | Size: 227 KiB |
|
Before Width: | Height: | Size: 6.1 KiB |
|
Before Width: | Height: | Size: 6.3 KiB |
|
Before Width: | Height: | Size: 126 KiB After Width: | Height: | Size: 227 KiB |
|
Before Width: | Height: | Size: 7.4 KiB After Width: | Height: | Size: 10 KiB |
|
Before Width: | Height: | Size: 7.9 KiB After Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 8.6 KiB |
|
Before Width: | Height: | Size: 10 KiB |
|
Before Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 455 B |
|
Before Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 13 KiB |
|
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 20 KiB |
|
Before Width: | Height: | Size: 16 KiB |
|
Before Width: | Height: | Size: 591 B |
|
Before Width: | Height: | Size: 18 KiB |
|
Before Width: | Height: | Size: 22 KiB |
|
Before Width: | Height: | Size: 1010 B After Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 2.4 KiB |
|
Before Width: | Height: | Size: 2.3 KiB |
|
Before Width: | Height: | Size: 2.4 KiB |
|
Before Width: | Height: | Size: 53 KiB |
|
Before Width: | Height: | Size: 2.7 KiB |
|
Before Width: | Height: | Size: 2.9 KiB After Width: | Height: | Size: 4.1 KiB |
|
Before Width: | Height: | Size: 2.9 KiB After Width: | Height: | Size: 4.1 KiB |
|
Before Width: | Height: | Size: 3.1 KiB After Width: | Height: | Size: 4.3 KiB |
|
Before Width: | Height: | Size: 3.4 KiB |
|
Before Width: | Height: | Size: 3.4 KiB |
|
Before Width: | Height: | Size: 3.9 KiB |
|
Before Width: | Height: | Size: 4.2 KiB |
|
Before Width: | Height: | Size: 4.6 KiB After Width: | Height: | Size: 6.4 KiB |
|
Before Width: | Height: | Size: 5.2 KiB After Width: | Height: | Size: 7.2 KiB |
|
Before Width: | Height: | Size: 5.2 KiB |
|
Before Width: | Height: | Size: 5.5 KiB |
|
Before Width: | Height: | Size: 232 KiB |
|
Before Width: | Height: | Size: 634 B |
|
Before Width: | Height: | Size: 1.8 KiB |
|
Before Width: | Height: | Size: 3.3 KiB |
|
Before Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 3.2 KiB |
|
Before Width: | Height: | Size: 5.7 KiB |
|
Before Width: | Height: | Size: 1.8 KiB |
|
Before Width: | Height: | Size: 5.1 KiB |
|
Before Width: | Height: | Size: 8.8 KiB |
|
Before Width: | Height: | Size: 2.5 KiB |
|
Before Width: | Height: | Size: 6.8 KiB |
|
Before Width: | Height: | Size: 3.1 KiB |
|
Before Width: | Height: | Size: 8.3 KiB |
|
Before Width: | Height: | Size: 8.8 KiB |
|
Before Width: | Height: | Size: 15 KiB |
|
Before Width: | Height: | Size: 4.2 KiB |
|
Before Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 4.7 KiB |
|
Before Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 14 KiB |
@@ -27,7 +27,7 @@
|
|||||||
<key>CFBundleDevelopmentRegion</key>
|
<key>CFBundleDevelopmentRegion</key>
|
||||||
<string>$(DEVELOPMENT_LANGUAGE)</string>
|
<string>$(DEVELOPMENT_LANGUAGE)</string>
|
||||||
<key>CFBundleDisplayName</key>
|
<key>CFBundleDisplayName</key>
|
||||||
<string>Sefer</string>
|
<string>Speed</string>
|
||||||
<key>CFBundleExecutable</key>
|
<key>CFBundleExecutable</key>
|
||||||
<string>$(EXECUTABLE_NAME)</string>
|
<string>$(EXECUTABLE_NAME)</string>
|
||||||
<key>CFBundleGetInfoString</key>
|
<key>CFBundleGetInfoString</key>
|
||||||
@@ -37,15 +37,15 @@
|
|||||||
<key>CFBundleInfoDictionaryVersion</key>
|
<key>CFBundleInfoDictionaryVersion</key>
|
||||||
<string>6.0</string>
|
<string>6.0</string>
|
||||||
<key>CFBundleName</key>
|
<key>CFBundleName</key>
|
||||||
<string>Sefer</string>
|
<string>Speed</string>
|
||||||
<key>CFBundlePackageType</key>
|
<key>CFBundlePackageType</key>
|
||||||
<string>APPL</string>
|
<string>APPL</string>
|
||||||
<key>CFBundleShortVersionString</key>
|
<key>CFBundleShortVersionString</key>
|
||||||
<string>82</string>
|
<string>83</string>
|
||||||
<key>CFBundleSignature</key>
|
<key>CFBundleSignature</key>
|
||||||
<string>????</string>
|
<string>????</string>
|
||||||
<key>CFBundleVersion</key>
|
<key>CFBundleVersion</key>
|
||||||
<string>4.3.82</string>
|
<string>4.3.83</string>
|
||||||
<key>NSHumanReadableCopyright</key>
|
<key>NSHumanReadableCopyright</key>
|
||||||
<string></string>
|
<string></string>
|
||||||
<key>FirebaseAppDelegateProxyEnabled</key>
|
<key>FirebaseAppDelegateProxyEnabled</key>
|
||||||
|
|||||||
@@ -7,9 +7,13 @@ class BoxName {
|
|||||||
static const String lang = "lang";
|
static const String lang = "lang";
|
||||||
static const String serverChosen = "serverChosen";
|
static const String serverChosen = "serverChosen";
|
||||||
static const String gender = "gender";
|
static const String gender = "gender";
|
||||||
|
static const String serverLocations = "serverLocations";
|
||||||
static const String carType = "carType";
|
static const String carType = "carType";
|
||||||
static const String carPlate = "carPlate";
|
static const String carPlate = "carPlate";
|
||||||
|
static const String basicLink = "basicLink";
|
||||||
static const String packagInfo = "packagInfo";
|
static const String packagInfo = "packagInfo";
|
||||||
|
static const String paymentLink = "paymentLink";
|
||||||
|
static const String locationName = "locationName";
|
||||||
static const String isVerified = 'isVerified';
|
static const String isVerified = 'isVerified';
|
||||||
static const String isFirstTime = 'isFirstTime';
|
static const String isFirstTime = 'isFirstTime';
|
||||||
static const String isSavedPhones = 'isSavedPhones';
|
static const String isSavedPhones = 'isSavedPhones';
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
class AppInformation {
|
class AppInformation {
|
||||||
static const String companyName = 'Sefer llc';
|
static const String companyName = 'SPEED llc';
|
||||||
static const String appName = 'SEFER';
|
static const String appName = 'SPEED';
|
||||||
static const String phoneNumber = '962798583052';
|
static const String phoneNumber = '962798583052';
|
||||||
static const String linkedInProfile =
|
static const String linkedInProfile =
|
||||||
'https://www.linkedin.com/in/hamza-ayed/';
|
'https://www.linkedin.com/in/hamza-ayed/';
|
||||||
@@ -75,10 +75,10 @@ class AppInformation {
|
|||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<h1 style="color: black;font: 45px/50px MuseoSans900, Open Sans, sans-serif;">Terms and Conditions</h1>
|
<h1 style="color: black;font: 45px/50px MuseoSans900, Open Sans, sans-serif;">Terms and Conditions</h1>
|
||||||
<p><strong>1 TERMS OF USE</strong></p>
|
<p><strong>1 TERMS OF USE</strong></p>
|
||||||
<p>By downloading, browsing, accessing or using the Mobile Application; “Sefer”, Users agree to be bound by these Terms and Conditions of Use. We reserve the right to amend these terms and conditions at any time. If the User disagrees with any of these Terms and Conditions of Use, the User must immediately discontinue their access to the Mobile Application and their use of the services offered on the Mobile Application. Continued use of the Mobile Application will constitute acceptance of these Terms and Conditions of Use, as may be amended from time to time.</p>
|
<p>By downloading, browsing, accessing or using the Mobile Application; “SPEED”, Users agree to be bound by these Terms and Conditions of Use. We reserve the right to amend these terms and conditions at any time. If the User disagrees with any of these Terms and Conditions of Use, the User must immediately discontinue their access to the Mobile Application and their use of the services offered on the Mobile Application. Continued use of the Mobile Application will constitute acceptance of these Terms and Conditions of Use, as may be amended from time to time.</p>
|
||||||
<p><strong>2.1. DEFINITIONS</strong></p>
|
<p><strong>2.1. DEFINITIONS</strong></p>
|
||||||
<p>In these Terms and Conditions of Use, the following capitalized terms shall have the following meanings, except where the context otherwise requires:</p>
|
<p>In these Terms and Conditions of Use, the following capitalized terms shall have the following meanings, except where the context otherwise requires:</p>
|
||||||
<p>“Mobile Application” or “Sefer” refers to the smartphone software through which the company mediates services between Users and Service Providers.</p>
|
<p>“Mobile Application” or “SPEED” refers to the smartphone software through which the company mediates services between Users and Service Providers.</p>
|
||||||
<p>"Account" means an account created by a User or a Service Provider on the Mobile Application as part of Registration.</p>
|
<p>"Account" means an account created by a User or a Service Provider on the Mobile Application as part of Registration.</p>
|
||||||
<p> “Service Providers” refers to the individuals or companies registered within the Company to provide products or services approved and mediated by the Company/Mobile Application and that are requested/purchased by “Users”. “Service Provider” means any one of them.</p>
|
<p> “Service Providers” refers to the individuals or companies registered within the Company to provide products or services approved and mediated by the Company/Mobile Application and that are requested/purchased by “Users”. “Service Provider” means any one of them.</p>
|
||||||
<p>"Users" means users of the Mobile Application, including you and "User" means any one of them. “Users” also includes Service Providers using the Mobile Application version dedicated to the use of Service Providers.</p>
|
<p>"Users" means users of the Mobile Application, including you and "User" means any one of them. “Users” also includes Service Providers using the Mobile Application version dedicated to the use of Service Providers.</p>
|
||||||
@@ -87,8 +87,8 @@ class AppInformation {
|
|||||||
<p>"Redemption" means the act of redeeming such products or services.</p>
|
<p>"Redemption" means the act of redeeming such products or services.</p>
|
||||||
<p>"Register" means to create an Account on the Mobile Application and "Registration" means the act of creating such an Account.</p>
|
<p>"Register" means to create an Account on the Mobile Application and "Registration" means the act of creating such an Account.</p>
|
||||||
<p>"Services" means all the services provided by Service Providers via the Mobile Application and mediated by the Company to Users, and "Service" means any one of them.</p>
|
<p>"Services" means all the services provided by Service Providers via the Mobile Application and mediated by the Company to Users, and "Service" means any one of them.</p>
|
||||||
<p><strong>2.2. WHAT IS THE MOBILE APPLICATION, “Sefer”?</strong></p>
|
<p><strong>2.2. WHAT IS THE MOBILE APPLICATION, “SPEED”?</strong></p>
|
||||||
<p>The “Sefer” Mobile Application consists in a specialize service with the purpose to schedule/match the Service Provider with the User, however without creating any employee relationship with the Service Provider, meaning that the Mobile Application should be considered only as a service mediator with the purpose of scheduling/matching between Users and Service Providers for the latter to fulfill the service requested by Users. Through the system, the Company allows, totally free of charge, the Users to sign up and request the desired available services from Service Providers in a more efficient way than the conventional existing methods. The Service Providers, by their means, can register on the Mobile Application dedicated for Service Providers through the methods indicated by the Company, pending an evaluation from the Company and the necessary documentation when signing up in accordance with guidelines set by the Transportation General Authority (TGA) to provide services through the Mobile Application. The Service Provider will pay a profit margin fee determined by the Company -in knowledge of the Service Provider- per completed service. Users can pay their ride fare using Apple Pay as an additional payment method in Saudi Arabia on iPhones</p>
|
<p>The “SPEED” Mobile Application consists in a specialize service with the purpose to schedule/match the Service Provider with the User, however without creating any employee relationship with the Service Provider, meaning that the Mobile Application should be considered only as a service mediator with the purpose of scheduling/matching between Users and Service Providers for the latter to fulfill the service requested by Users. Through the system, the Company allows, totally free of charge, the Users to sign up and request the desired available services from Service Providers in a more efficient way than the conventional existing methods. The Service Providers, by their means, can register on the Mobile Application dedicated for Service Providers through the methods indicated by the Company, pending an evaluation from the Company and the necessary documentation when signing up in accordance with guidelines set by the Transportation General Authority (TGA) to provide services through the Mobile Application. The Service Provider will pay a profit margin fee determined by the Company -in knowledge of the Service Provider- per completed service. Users can pay their ride fare using Apple Pay as an additional payment method in Saudi Arabia on iPhones</p>
|
||||||
<p> </p>
|
<p> </p>
|
||||||
<p><strong>3. GENERAL ISSUES ABOUT THE MOBILE APPLICATION AND THE SERVICES</strong></p>
|
<p><strong>3. GENERAL ISSUES ABOUT THE MOBILE APPLICATION AND THE SERVICES</strong></p>
|
||||||
<p><strong>3.1 Applicability of terms and conditions:</strong> The use of any Services and/or the Mobile Application and the making of any Redemptions are subject to these Terms and Conditions of Use.</p>
|
<p><strong>3.1 Applicability of terms and conditions:</strong> The use of any Services and/or the Mobile Application and the making of any Redemptions are subject to these Terms and Conditions of Use.</p>
|
||||||
@@ -143,7 +143,7 @@ class AppInformation {
|
|||||||
<p><strong>7.3 </strong>We do not give any warranty that the Services and the Mobile Application are free from viruses or anything else which may have a harmful effect on any technology.</p>
|
<p><strong>7.3 </strong>We do not give any warranty that the Services and the Mobile Application are free from viruses or anything else which may have a harmful effect on any technology.</p>
|
||||||
<p><strong>7.4 </strong>We reserve the right to change, modify, substitute, suspend or remove without notice any information or Services on the Mobile Application from time to time. Users’ access to the Mobile Application and/or the Services may also be occasionally restricted to allow for repairs, maintenance or the introduction of new facilities or services. We will attempt to restore such access as soon as we reasonably can. For the avoidance of doubt, we reserve the right to withdraw any information or Services from the Mobile Application at any time.</p>
|
<p><strong>7.4 </strong>We reserve the right to change, modify, substitute, suspend or remove without notice any information or Services on the Mobile Application from time to time. Users’ access to the Mobile Application and/or the Services may also be occasionally restricted to allow for repairs, maintenance or the introduction of new facilities or services. We will attempt to restore such access as soon as we reasonably can. For the avoidance of doubt, we reserve the right to withdraw any information or Services from the Mobile Application at any time.</p>
|
||||||
<p><strong>7.5 </strong>We reserve the right to block access to and/or to edit or remove any material which in our reasonable opinion may give rise to a breach of these Terms and Conditions of Use.</p>
|
<p><strong>7.5 </strong>We reserve the right to block access to and/or to edit or remove any material which in our reasonable opinion may give rise to a breach of these Terms and Conditions of Use.</p>
|
||||||
<p><strong>7.6</strong> The acceptance and denial of the service request may occur at first by the Service Provider, who can accept or deny the service when receiving a notification for a request. The User may cancel the contract for any reason which may or may not apply cancellation fees for which the conditions and amount is determined and communicated by the Company. Both recognize that “Sefer” is not liable for any delays, cancellations, failure to cancel the contract and miscommunication between the User and the Service Provider, nor for any delay or failure in the delivery of services from the Service Provider.</p>
|
<p><strong>7.6</strong> The acceptance and denial of the service request may occur at first by the Service Provider, who can accept or deny the service when receiving a notification for a request. The User may cancel the contract for any reason which may or may not apply cancellation fees for which the conditions and amount is determined and communicated by the Company. Both recognize that “SPEED” is not liable for any delays, cancellations, failure to cancel the contract and miscommunication between the User and the Service Provider, nor for any delay or failure in the delivery of services from the Service Provider.</p>
|
||||||
<p> </p>
|
<p> </p>
|
||||||
<p><strong>8. SUSPENSION AND TERMINATION</strong></p>
|
<p><strong>8. SUSPENSION AND TERMINATION</strong></p>
|
||||||
<p><strong>8.1</strong> If the User uses (or others, with the User’s permission use) the Mobile Application, any Services in contravention of these Terms and Conditions of Use, we may suspend their use of the Services and/or Mobile Application.</p>
|
<p><strong>8.1</strong> If the User uses (or others, with the User’s permission use) the Mobile Application, any Services in contravention of these Terms and Conditions of Use, we may suspend their use of the Services and/or Mobile Application.</p>
|
||||||
@@ -194,7 +194,7 @@ class AppInformation {
|
|||||||
<p><strong>(f)</strong> We will protect personal information by reasonable security safeguards against loss or theft, as well as unauthorized access, disclosure, copying, use or modification.</p>
|
<p><strong>(f)</strong> We will protect personal information by reasonable security safeguards against loss or theft, as well as unauthorized access, disclosure, copying, use or modification.</p>
|
||||||
<p><strong>(g) </strong>The Company further reserves the right to use all legal means possible and to identify the Users, as well as to request, at any time, additional data and documents it considers appropriate in order to verify personal data informed by the user.</p>
|
<p><strong>(g) </strong>The Company further reserves the right to use all legal means possible and to identify the Users, as well as to request, at any time, additional data and documents it considers appropriate in order to verify personal data informed by the user.</p>
|
||||||
<p>We are committed to conducting our business in accordance with these principles in order to ensure that the confidentiality of personal information is protected and maintained.</p>
|
<p>We are committed to conducting our business in accordance with these principles in order to ensure that the confidentiality of personal information is protected and maintained.</p>
|
||||||
<p><strong>14.3 Social logins policy</strong><br>Our Services offers you the ability to register and login using Facebook. Where you choose to do this, we will receive certain profile information about you from your social media provider. The profile Information may include your name and social token.<br>We will use the information we receive only to associate your social token with your Sefer account or for the purposes that are described in this privacy policy. <br><br><strong>14.4 Account and data deletion</strong><br>Based on the applicable laws of your country, you may have the right to request the deletion of your personal data in some circumstances. If you want to delete your account or personal data in the application, please contact us via e-mail: support@mobile-app.store. We will respond to your request within 30 days.</p>
|
<p><strong>14.3 Social logins policy</strong><br>Our Services offers you the ability to register and login using Facebook. Where you choose to do this, we will receive certain profile information about you from your social media provider. The profile Information may include your name and social token.<br>We will use the information we receive only to associate your social token with your SPEED account or for the purposes that are described in this privacy policy. <br><br><strong>14.4 Account and data deletion</strong><br>Based on the applicable laws of your country, you may have the right to request the deletion of your personal data in some circumstances. If you want to delete your account or personal data in the application, please contact us via e-mail: support@mobile-app.store. We will respond to your request within 30 days.</p>
|
||||||
<p><strong>15. In-Ride Policy</strong></p>
|
<p><strong>15. In-Ride Policy</strong></p>
|
||||||
<p><strong>15.1 Smoking Policy: </strong></p>
|
<p><strong>15.1 Smoking Policy: </strong></p>
|
||||||
<p>No smoking or other use of tobacco products (including, but not limited to, cigarettes, pipes, cigars, snuff, or chewing tobacco) is permitted during rides. No cigarette butts or other traces of smell, litter, or tobacco use should be present in the vehicle. <img style="width: 5%;" id="content-img" src="https://classic.Seferme.com/media/48/download/No_Smoking.svg?v=1%22" alt="image"> </p>
|
<p>No smoking or other use of tobacco products (including, but not limited to, cigarettes, pipes, cigars, snuff, or chewing tobacco) is permitted during rides. No cigarette butts or other traces of smell, litter, or tobacco use should be present in the vehicle. <img style="width: 5%;" id="content-img" src="https://classic.Seferme.com/media/48/download/No_Smoking.svg?v=1%22" alt="image"> </p>
|
||||||
@@ -2335,7 +2335,7 @@ double nearestDistance = double.infinity;</span>
|
|||||||
<span title="Arabic (Egypt)" class="c12b5a4e69860bc968b47223fd-history-lng-name-to">Arabic (Egypt)</span>
|
<span title="Arabic (Egypt)" class="c12b5a4e69860bc968b47223fd-history-lng-name-to">Arabic (Egypt)</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<span title="Sefer" class="c12b5a4e69860bc968b47223fd-history-item-text-from">Sefer</span>
|
<span title="SPEED" class="c12b5a4e69860bc968b47223fd-history-item-text-from">SPEED</span>
|
||||||
<span title="سفر" class="c12b5a4e69860bc968b47223fd-history-item-text-to">سفر</span>
|
<span title="سفر" class="c12b5a4e69860bc968b47223fd-history-item-text-to">سفر</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="c12b5a4e69860bc968b47223fd-history-item-remove">
|
<div class="c12b5a4e69860bc968b47223fd-history-item-remove">
|
||||||
@@ -2359,8 +2359,8 @@ double nearestDistance = double.infinity;</span>
|
|||||||
<span title="Arabic (Egypt)" class="c12b5a4e69860bc968b47223fd-history-lng-name-to">Arabic (Egypt)</span>
|
<span title="Arabic (Egypt)" class="c12b5a4e69860bc968b47223fd-history-lng-name-to">Arabic (Egypt)</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<span title="write short description for my app sefer in en and ar and tr" class="c12b5a4e69860bc968b47223fd-history-item-text-from">write short description for my app sefer in en and ar and tr</span>
|
<span title="write short description for my app SPEED in en and ar and tr" class="c12b5a4e69860bc968b47223fd-history-item-text-from">write short description for my app SPEED in en and ar and tr</span>
|
||||||
<span title="اكتب وصفًا مختصرًا لتطبيقي sefer باللغة en وar وtr" class="c12b5a4e69860bc968b47223fd-history-item-text-to">اكتب وصفًا مختصرًا لتطبيقي sefer باللغة en وar وtr</span>
|
<span title="اكتب وصفًا مختصرًا لتطبيقي SPEED باللغة en وar وtr" class="c12b5a4e69860bc968b47223fd-history-item-text-to">اكتب وصفًا مختصرًا لتطبيقي SPEED باللغة en وar وtr</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="c12b5a4e69860bc968b47223fd-history-item-remove">
|
<div class="c12b5a4e69860bc968b47223fd-history-item-remove">
|
||||||
<img src="chrome-extension://mnlohknjofogcljbcknkakphddjpijak/assets/Images/delete-icon.svg" alt="delete history element">
|
<img src="chrome-extension://mnlohknjofogcljbcknkakphddjpijak/assets/Images/delete-icon.svg" alt="delete history element">
|
||||||
@@ -2383,8 +2383,8 @@ double nearestDistance = double.infinity;</span>
|
|||||||
<span title="Arabic (Egypt)" class="c12b5a4e69860bc968b47223fd-history-lng-name-to">Arabic (Egypt)</span>
|
<span title="Arabic (Egypt)" class="c12b5a4e69860bc968b47223fd-history-lng-name-to">Arabic (Egypt)</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<span title="Sefer, güvenilir ve uygun fiyatlı sürücülerle buluşan bir taksi çağırma uygulamasıdır." class="c12b5a4e69860bc968b47223fd-history-item-text-from">Sefer, güvenilir ve uygun fiyatlı sürücülerle buluşan bir taksi çağırma uygulamasıdır.</span>
|
<span title="SPEED, güvenilir ve uygun fiyatlı sürücülerle buluşan bir taksi çağırma uygulamasıdır." class="c12b5a4e69860bc968b47223fd-history-item-text-from">SPEED, güvenilir ve uygun fiyatlı sürücülerle buluşan bir taksi çağırma uygulamasıdır.</span>
|
||||||
<span title="Sefer, güvenilir ve uygun fiyatlı sürüculerle bluşan bil taksi çağırma uygulamasıdır." class="c12b5a4e69860bc968b47223fd-history-item-text-to">Sefer, güvenilir ve uygun fiyatlı sürüculerle bluşan bil taksi çağırma uygulamasıdır.</span>
|
<span title="SPEED, güvenilir ve uygun fiyatlı sürüculerle bluşan bil taksi çağırma uygulamasıdır." class="c12b5a4e69860bc968b47223fd-history-item-text-to">SPEED, güvenilir ve uygun fiyatlı sürüculerle bluşan bil taksi çağırma uygulamasıdır.</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="c12b5a4e69860bc968b47223fd-history-item-remove">
|
<div class="c12b5a4e69860bc968b47223fd-history-item-remove">
|
||||||
<img src="chrome-extension://mnlohknjofogcljbcknkakphddjpijak/assets/Images/delete-icon.svg" alt="delete history element">
|
<img src="chrome-extension://mnlohknjofogcljbcknkakphddjpijak/assets/Images/delete-icon.svg" alt="delete history element">
|
||||||
@@ -2407,7 +2407,7 @@ double nearestDistance = double.infinity;</span>
|
|||||||
<span title="Arabic (Egypt)" class="c12b5a4e69860bc968b47223fd-history-lng-name-to">Arabic (Egypt)</span>
|
<span title="Arabic (Egypt)" class="c12b5a4e69860bc968b47223fd-history-lng-name-to">Arabic (Egypt)</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<span title="Sefer, sizi bölgenizdeki güvenilir ve uygun fiyatlı sürücülerle buluşturan bir taksi çağırma uygulamasıdır." class="c12b5a4e69860bc968b47223fd-history-item-text-from">Sefer, sizi bölgenizdeki güvenilir ve uygun fiyatlı sürücülerle buluşturan bir taksi çağırma uygulamasıdır.</span>
|
<span title="SPEED, sizi bölgenizdeki güvenilir ve uygun fiyatlı sürücülerle buluşturan bir taksi çağırma uygulamasıdır." class="c12b5a4e69860bc968b47223fd-history-item-text-from">SPEED, sizi bölgenizdeki güvenilir ve uygun fiyatlı sürücülerle buluşturan bir taksi çağırma uygulamasıdır.</span>
|
||||||
<span title="علاوة على ذلك، فإن جميع أفراد العائلة والأصدقاء يستمتعون بالمزيد من الراحة من خلال سيارات الأجرة." class="c12b5a4e69860bc968b47223fd-history-item-text-to">علاوة على ذلك، فإن جميع أفراد العائلة والأصدقاء يستمتعون بالمزيد من الراحة من خلال سيارات الأجرة.</span>
|
<span title="علاوة على ذلك، فإن جميع أفراد العائلة والأصدقاء يستمتعون بالمزيد من الراحة من خلال سيارات الأجرة." class="c12b5a4e69860bc968b47223fd-history-item-text-to">علاوة على ذلك، فإن جميع أفراد العائلة والأصدقاء يستمتعون بالمزيد من الراحة من خلال سيارات الأجرة.</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="c12b5a4e69860bc968b47223fd-history-item-remove">
|
<div class="c12b5a4e69860bc968b47223fd-history-item-remove">
|
||||||
@@ -2455,8 +2455,8 @@ double nearestDistance = double.infinity;</span>
|
|||||||
<span title="Arabic (Egypt)" class="c12b5a4e69860bc968b47223fd-history-lng-name-to">Arabic (Egypt)</span>
|
<span title="Arabic (Egypt)" class="c12b5a4e69860bc968b47223fd-history-lng-name-to">Arabic (Egypt)</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<span title="Sefer: Ride-hailing app for a seamless and affordable travel experience" class="c12b5a4e69860bc968b47223fd-history-item-text-from">Sefer: Ride-hailing app for a seamless and affordable travel experience</span>
|
<span title="SPEED: Ride-hailing app for a seamless and affordable travel experience" class="c12b5a4e69860bc968b47223fd-history-item-text-from">SPEED: Ride-hailing app for a seamless and affordable travel experience</span>
|
||||||
<span title="Sefer: تطبيق نقل الركاب لتجربة سفر سلسة وبأسعار معقولة" class="c12b5a4e69860bc968b47223fd-history-item-text-to">Sefer: تطبيق نقل الركاب لتجربة سفر سلسة وبأسعار معقولة</span>
|
<span title="SPEED: تطبيق نقل الركاب لتجربة سفر سلسة وبأسعار معقولة" class="c12b5a4e69860bc968b47223fd-history-item-text-to">SPEED: تطبيق نقل الركاب لتجربة سفر سلسة وبأسعار معقولة</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="c12b5a4e69860bc968b47223fd-history-item-remove">
|
<div class="c12b5a4e69860bc968b47223fd-history-item-remove">
|
||||||
<img src="chrome-extension://mnlohknjofogcljbcknkakphddjpijak/assets/Images/delete-icon.svg" alt="delete history element">
|
<img src="chrome-extension://mnlohknjofogcljbcknkakphddjpijak/assets/Images/delete-icon.svg" alt="delete history element">
|
||||||
|
|||||||
@@ -8,17 +8,29 @@ class AppLink {
|
|||||||
// static final String seferAlexandriaServer = Env.seferAlexandriaServer;
|
// static final String seferAlexandriaServer = Env.seferAlexandriaServer;
|
||||||
// static final String seferCairoServer = Env.seferCairoServer;
|
// static final String seferCairoServer = Env.seferCairoServer;
|
||||||
static String serverPHP = box.read('serverPHP');
|
static String serverPHP = box.read('serverPHP');
|
||||||
static String seferCairoServer = box.read('seferCairoServer');
|
// static String seferCairoServer =
|
||||||
static String seferGizaServer = box.read('seferGizaServer');
|
// box.read(BoxName.locationName)[0]['server_link'];
|
||||||
static String seferAlexandriaServer = box.read('seferAlexandriaServer');
|
// static String seferGizaServer = box.read(BoxName.serverChosen);
|
||||||
static String seferPaymentServer = box.read('seferPaymentServer');
|
// static String seferAlexandriaServer = box.read(BoxName.serverChosen);
|
||||||
|
// static String seferPaymentServer = box.read('seferPaymentServer');
|
||||||
|
|
||||||
|
static String seferPaymentServer = box.read(BoxName.paymentLink);
|
||||||
|
// 'https://wallet.sefer.live/seferpw.shop/sefer/';
|
||||||
static String seferPaymentServer0 = box.read('seferPaymentServer');
|
static String seferPaymentServer0 = box.read('seferPaymentServer');
|
||||||
// static const String seferGizaServer = 'https://gizasefer.online/sefer';
|
// static const String seferGizaServer = 'https://gizasefer.online/sefer';
|
||||||
// static final String seferGizaServer = Env.seferGizaServer;
|
// static final String seferGizaServer = Env.seferGizaServer;
|
||||||
static final String endPoint = box.read(BoxName.serverChosen);
|
// static final String endPoint = box.read(BoxName.serverChosen);
|
||||||
static final String server = Env.seferCairoServer;
|
// static final String server = endPoint;
|
||||||
// static final String server = Env.serverPHP;
|
// static final String server = Env.serverPHP;
|
||||||
|
|
||||||
|
static final String endPoint =
|
||||||
|
box.read(BoxName.serverChosen) ?? box.read(BoxName.basicLink);
|
||||||
|
// 'https://server.sefer.live/sefer.click/sefer';
|
||||||
|
static final String server = endPoint;
|
||||||
|
static String seferCairoServer = endPoint;
|
||||||
|
static String seferGizaServer = box.read('Giza');
|
||||||
|
static String seferAlexandriaServer = box.read('Alexandria');
|
||||||
|
|
||||||
static String googleMapsLink = 'https://maps.googleapis.com/maps/api/';
|
static String googleMapsLink = 'https://maps.googleapis.com/maps/api/';
|
||||||
static String searcMaps =
|
static String searcMaps =
|
||||||
'https://autosuggest.search.hereapi.com/v1/autosuggest';
|
'https://autosuggest.search.hereapi.com/v1/autosuggest';
|
||||||
@@ -217,6 +229,9 @@ class AppLink {
|
|||||||
//==================certifcate==========
|
//==================certifcate==========
|
||||||
static String location = '${box.read(BoxName.serverChosen)}/ride/location';
|
static String location = '${box.read(BoxName.serverChosen)}/ride/location';
|
||||||
static String getCarsLocationByPassenger = "$location/get.php";
|
static String getCarsLocationByPassenger = "$location/get.php";
|
||||||
|
|
||||||
|
static String getLocationAreaLinks =
|
||||||
|
"https://server.sefer.live/sefer.click/sefer/ride/location/get_location_area_links.php";
|
||||||
static String addpassengerLocation = "$location/addpassengerLocation.php";
|
static String addpassengerLocation = "$location/addpassengerLocation.php";
|
||||||
static String getCarsLocationByPassengerSpeed = "$location/getSpeed.php";
|
static String getCarsLocationByPassengerSpeed = "$location/getSpeed.php";
|
||||||
static String getCarsLocationByPassengerComfort = "$location/getComfort.php";
|
static String getCarsLocationByPassengerComfort = "$location/getComfort.php";
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ import 'dart:io';
|
|||||||
|
|
||||||
import 'package:SEFER/constant/box_name.dart';
|
import 'package:SEFER/constant/box_name.dart';
|
||||||
import 'package:SEFER/controller/auth/login_controller.dart';
|
import 'package:SEFER/controller/auth/login_controller.dart';
|
||||||
|
import 'package:SEFER/controller/functions/encrypt_decrypt.dart';
|
||||||
import 'package:SEFER/main.dart';
|
import 'package:SEFER/main.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter/services.dart';
|
import 'package:flutter/services.dart';
|
||||||
@@ -164,9 +165,11 @@ class GoogleSignInHelper {
|
|||||||
static Future<void> _handleSignUp(GoogleSignInAccount user) async {
|
static Future<void> _handleSignUp(GoogleSignInAccount user) async {
|
||||||
// Store driver information
|
// Store driver information
|
||||||
box.write(BoxName.passengerID, user.id);
|
box.write(BoxName.passengerID, user.id);
|
||||||
box.write(BoxName.email, user.email);
|
box.write(BoxName.email, encryptionHelper.encryptData(user.email));
|
||||||
box.write(BoxName.name, user.displayName);
|
box.write(BoxName.name,
|
||||||
box.write(BoxName.passengerPhotoUrl, user.photoUrl);
|
encryptionHelper.encryptData(user.displayName.toString()));
|
||||||
|
box.write(BoxName.passengerPhotoUrl,
|
||||||
|
encryptionHelper.encryptData(user.photoUrl.toString()));
|
||||||
|
|
||||||
// Perform any additional sign-up tasks or API calls here
|
// Perform any additional sign-up tasks or API calls here
|
||||||
// For example, you can send the user data to your server for registration
|
// For example, you can send the user data to your server for registration
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ import 'package:SEFER/controller/firebase/firbase_messge.dart';
|
|||||||
import 'package:SEFER/controller/functions/add_error.dart';
|
import 'package:SEFER/controller/functions/add_error.dart';
|
||||||
import 'package:SEFER/views/auth/login_page.dart';
|
import 'package:SEFER/views/auth/login_page.dart';
|
||||||
import 'package:SEFER/views/auth/sms_verfy_page.dart';
|
import 'package:SEFER/views/auth/sms_verfy_page.dart';
|
||||||
|
import 'package:SEFER/views/widgets/mydialoug.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
import 'package:SEFER/constant/box_name.dart';
|
import 'package:SEFER/constant/box_name.dart';
|
||||||
@@ -16,6 +17,7 @@ import 'package:SEFER/views/home/map_page_passenger.dart';
|
|||||||
import 'package:location/location.dart';
|
import 'package:location/location.dart';
|
||||||
|
|
||||||
import '../../print.dart';
|
import '../../print.dart';
|
||||||
|
import '../functions/encrypt_decrypt.dart';
|
||||||
import '../functions/package_info.dart';
|
import '../functions/package_info.dart';
|
||||||
|
|
||||||
class LoginController extends GetxController {
|
class LoginController extends GetxController {
|
||||||
@@ -106,41 +108,56 @@ class LoginController extends GetxController {
|
|||||||
box.write(BoxName.validity, d['validity']);
|
box.write(BoxName.validity, d['validity']);
|
||||||
box.write(BoxName.isInstall, d['isInstall'] ?? 'none');
|
box.write(BoxName.isInstall, d['isInstall'] ?? 'none');
|
||||||
box.write(BoxName.isGiftToken, d['isGiftToken'] ?? 'none');
|
box.write(BoxName.isGiftToken, d['isGiftToken'] ?? 'none');
|
||||||
box.write(BoxName.inviteCode, d['inviteCode'] ?? 'none');
|
box.write(
|
||||||
|
BoxName.inviteCode,
|
||||||
|
encryptionHelper.decryptData(d['inviteCode'].toString()) ??
|
||||||
|
'none');
|
||||||
|
|
||||||
var token = await CRUD().get(link: AppLink.getTokens, payload: {
|
var token = await CRUD().get(link: AppLink.getTokens, payload: {
|
||||||
'passengerID': box.read(BoxName.passengerID).toString()
|
'passengerID': box.read(BoxName.passengerID).toString()
|
||||||
});
|
});
|
||||||
if (token != 'failure') {
|
if (token != 'failure') {
|
||||||
if (jsonDecode(token)['data'][0]['token'] !=
|
if (encryptionHelper.decryptData(
|
||||||
|
jsonDecode(token)['data'][0]['token'].toString()) !=
|
||||||
box.read(BoxName.tokenFCM)) {
|
box.read(BoxName.tokenFCM)) {
|
||||||
Get.put(FirebaseMessagesController()).sendNotificationToDriverMAP(
|
MyDialog().getDialog('change device'.tr, 'token change'.tr,
|
||||||
'token change'.tr,
|
() async {
|
||||||
'change device'.tr,
|
List<Future> updatetoken = [
|
||||||
jsonDecode(token)['data'][0]['token'].toString(),
|
CRUD().post(
|
||||||
[],
|
link: "${AppLink.server}/ride/firebase/add.php",
|
||||||
'cancel.wav',
|
payload: {
|
||||||
);
|
'token': box.read(BoxName.tokenFCM),
|
||||||
|
'passengerID': box.read(BoxName.passengerID).toString()
|
||||||
|
}),
|
||||||
|
CRUD().post(
|
||||||
|
link:
|
||||||
|
"${AppLink.seferAlexandriaServer}/ride/firebase/add.php",
|
||||||
|
payload: {
|
||||||
|
'token': box.read(BoxName.tokenFCM),
|
||||||
|
'passengerID': box.read(BoxName.passengerID).toString()
|
||||||
|
}),
|
||||||
|
CRUD().post(
|
||||||
|
link: "${AppLink.seferGizaServer}/ride/firebase/add.php",
|
||||||
|
payload: {
|
||||||
|
'token': box.read(BoxName.tokenFCM),
|
||||||
|
'passengerID': box.read(BoxName.passengerID).toString()
|
||||||
|
}),
|
||||||
|
];
|
||||||
|
// cameras = await availableCameras();
|
||||||
|
await Future.wait(updatetoken);
|
||||||
|
Get.put(FirebaseMessagesController())
|
||||||
|
.sendNotificationToDriverMAP(
|
||||||
|
'token change'.tr,
|
||||||
|
'change device'.tr,
|
||||||
|
encryptionHelper.decryptData(
|
||||||
|
jsonDecode(token)['data'][0]['token'].toString()),
|
||||||
|
[],
|
||||||
|
'cancel.wav',
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
Future.delayed(const Duration(seconds: 1));
|
Future.delayed(const Duration(seconds: 1));
|
||||||
await CRUD().post(
|
|
||||||
link: "${AppLink.server}/ride/firebase/add.php",
|
|
||||||
payload: {
|
|
||||||
'token': box.read(BoxName.tokenFCM),
|
|
||||||
'passengerID': box.read(BoxName.passengerID).toString()
|
|
||||||
});
|
|
||||||
CRUD().post(
|
|
||||||
link:
|
|
||||||
"${AppLink.seferAlexandriaServer}/ride/firebase/add.php",
|
|
||||||
payload: {
|
|
||||||
'token': box.read(BoxName.tokenFCM),
|
|
||||||
'passengerID': box.read(BoxName.passengerID).toString()
|
|
||||||
});
|
|
||||||
CRUD().post(
|
|
||||||
link: "${AppLink.seferGizaServer}/ride/firebase/add.php",
|
|
||||||
payload: {
|
|
||||||
'token': box.read(BoxName.tokenFCM),
|
|
||||||
'passengerID': box.read(BoxName.passengerID).toString()
|
|
||||||
});
|
|
||||||
Get.defaultDialog(
|
Get.defaultDialog(
|
||||||
title: 'Device Change Detected'.tr,
|
title: 'Device Change Detected'.tr,
|
||||||
middleText:
|
middleText:
|
||||||
@@ -158,11 +175,14 @@ class LoginController extends GetxController {
|
|||||||
}
|
}
|
||||||
} // Logging to check if inviteCode is written correctly
|
} // Logging to check if inviteCode is written correctly
|
||||||
|
|
||||||
if (box.read(BoxName.inviteCode).toString() != 'none' &&
|
if (d['inviteCode'] != 'none' &&
|
||||||
|
d['inviteCode'] != null &&
|
||||||
|
// box.read(BoxName.inviteCode).toString() != 'none' &&
|
||||||
box.read(BoxName.isInstall).toString() != '1') {
|
box.read(BoxName.isInstall).toString() != '1') {
|
||||||
await CRUD()
|
await CRUD()
|
||||||
.post(link: AppLink.updatePassengersInvitation, payload: {
|
.post(link: AppLink.updatePassengersInvitation, payload: {
|
||||||
"inviteCode": box.read(BoxName.inviteCode).toString(),
|
"inviteCode": encryptionHelper
|
||||||
|
.encryptData(box.read(BoxName.inviteCode).toString()),
|
||||||
"passengerID": box.read(BoxName.passengerID).toString(),
|
"passengerID": box.read(BoxName.passengerID).toString(),
|
||||||
});
|
});
|
||||||
Get.defaultDialog(
|
Get.defaultDialog(
|
||||||
@@ -174,7 +194,7 @@ class LoginController extends GetxController {
|
|||||||
try {
|
try {
|
||||||
CRUD().post(link: AppLink.addPassengersPromo, payload: {
|
CRUD().post(link: AppLink.addPassengersPromo, payload: {
|
||||||
"promoCode":
|
"promoCode":
|
||||||
'S-${box.read(BoxName.name).toString().split(' ')[0]}',
|
'S-${encryptionHelper.decryptData(box.read(BoxName.name)).toString().split(' ')[0]}',
|
||||||
"amount": '25',
|
"amount": '25',
|
||||||
"passengerID": box.read(BoxName.passengerID).toString(),
|
"passengerID": box.read(BoxName.passengerID).toString(),
|
||||||
"description": 'promo first'
|
"description": 'promo first'
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import 'dart:math';
|
|||||||
import 'package:SEFER/constant/colors.dart';
|
import 'package:SEFER/constant/colors.dart';
|
||||||
import 'package:SEFER/controller/auth/login_controller.dart';
|
import 'package:SEFER/controller/auth/login_controller.dart';
|
||||||
import 'package:SEFER/controller/functions/add_error.dart';
|
import 'package:SEFER/controller/functions/add_error.dart';
|
||||||
import 'package:SEFER/controller/local/phone_intel/phone_number.dart';
|
import 'package:SEFER/controller/functions/encrypt_decrypt.dart';
|
||||||
import 'package:SEFER/views/home/map_page_passenger.dart';
|
import 'package:SEFER/views/home/map_page_passenger.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
@@ -143,7 +143,7 @@ class RegisterController extends GetxController {
|
|||||||
var responseChecker = await CRUD().post(
|
var responseChecker = await CRUD().post(
|
||||||
link: AppLink.checkPhoneNumberISVerfiedPassenger,
|
link: AppLink.checkPhoneNumberISVerfiedPassenger,
|
||||||
payload: {
|
payload: {
|
||||||
'phone_number': phoneNumber,
|
'phone_number': encryptionHelper.encryptData(phoneNumber),
|
||||||
'email': box.read(BoxName.email),
|
'email': box.read(BoxName.email),
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
@@ -156,7 +156,8 @@ class RegisterController extends GetxController {
|
|||||||
Get.snackbar('Phone number is verified before'.tr, '',
|
Get.snackbar('Phone number is verified before'.tr, '',
|
||||||
backgroundColor: AppColor.greenColor);
|
backgroundColor: AppColor.greenColor);
|
||||||
box.write(BoxName.isVerified, '1');
|
box.write(BoxName.isVerified, '1');
|
||||||
box.write(BoxName.phone, phoneNumber);
|
box.write(
|
||||||
|
BoxName.phone, encryptionHelper.encryptData(phoneNumber));
|
||||||
Get.offAll(const MapPagePassenger());
|
Get.offAll(const MapPagePassenger());
|
||||||
} else {
|
} else {
|
||||||
await sendOtp(phoneNumber, randomNumber, isEgyptianNumber,
|
await sendOtp(phoneNumber, randomNumber, isEgyptianNumber,
|
||||||
@@ -192,29 +193,34 @@ class RegisterController extends GetxController {
|
|||||||
// Trim any leading or trailing whitespace from the phone number
|
// Trim any leading or trailing whitespace from the phone number
|
||||||
phoneNumber = phoneNumber.trim();
|
phoneNumber = phoneNumber.trim();
|
||||||
var dd = await CRUD().post(link: AppLink.sendVerifyOtpMessage, payload: {
|
var dd = await CRUD().post(link: AppLink.sendVerifyOtpMessage, payload: {
|
||||||
'phone_number': phoneNumber,
|
'phone_number': encryptionHelper.encryptData(phoneNumber),
|
||||||
'token': otp.toString(),
|
'token': encryptionHelper.encryptData(otp.toString()),
|
||||||
});
|
});
|
||||||
Log.print('dd: ${dd}');
|
Log.print('dd: ${dd}');
|
||||||
if (isEgyptian) {
|
if (isEgyptian) {
|
||||||
await CRUD().post(link: AppLink.updatePhoneInvalidSMSPassenger, payload: {
|
await CRUD().post(link: AppLink.updatePhoneInvalidSMSPassenger, payload: {
|
||||||
"phone_number": Get.find<RegisterController>().phoneController.text
|
"phone_number": encryptionHelper
|
||||||
|
.encryptData(Get.find<RegisterController>().phoneController.text)
|
||||||
});
|
});
|
||||||
box.write(BoxName.phoneDriver, phoneController.text);
|
box.write(
|
||||||
var nameParts = box.read(BoxName.name).toString().split(' ');
|
BoxName.phone, encryptionHelper.encryptData(phoneController.text));
|
||||||
|
var nameParts = encryptionHelper
|
||||||
|
.decryptData(box.read(BoxName.name))
|
||||||
|
.toString()
|
||||||
|
.split(' ');
|
||||||
var firstName = nameParts.isNotEmpty ? nameParts[0] : 'unknown';
|
var firstName = nameParts.isNotEmpty ? nameParts[0] : 'unknown';
|
||||||
var lastName = nameParts.length > 1 ? nameParts[1] : 'unknown';
|
var lastName = nameParts.length > 1 ? nameParts[1] : 'unknown';
|
||||||
|
|
||||||
var payload = {
|
var payload = {
|
||||||
'id': box.read(BoxName.passengerID),
|
'id': box.read(BoxName.passengerID),
|
||||||
'phone': phoneController.text,
|
'phone': encryptionHelper.decryptData(phoneController.text),
|
||||||
'email': box.read(BoxName.email),
|
'email': box.read(BoxName.email),
|
||||||
'password': 'unknown',
|
'password': encryptionHelper.encryptData('unknown'),
|
||||||
'gender': 'unknown',
|
'gender': encryptionHelper.encryptData('unknown'),
|
||||||
'birthdate': '2002-01-01',
|
'birthdate': '2002-01-01',
|
||||||
'site': box.read(BoxName.passengerPhotoUrl) ?? 'unknown',
|
'site': box.read(BoxName.passengerPhotoUrl) ?? 'unknown',
|
||||||
'first_name': firstName,
|
'first_name': encryptionHelper.encryptData(firstName),
|
||||||
'last_name': lastName,
|
'last_name': encryptionHelper.encryptData(lastName),
|
||||||
};
|
};
|
||||||
|
|
||||||
var res1 = await CRUD().post(
|
var res1 = await CRUD().post(
|
||||||
@@ -223,18 +229,24 @@ class RegisterController extends GetxController {
|
|||||||
);
|
);
|
||||||
|
|
||||||
if (res1 != 'failure') {
|
if (res1 != 'failure') {
|
||||||
await CRUD().post(
|
if (AppLink.seferAlexandriaServer != AppLink.seferCairoServer) {
|
||||||
link: '${AppLink.seferAlexandriaServer}/auth/signup.php',
|
List<Future> signUp = [
|
||||||
payload: payload,
|
CRUD().post(
|
||||||
);
|
link: '${AppLink.seferAlexandriaServer}/auth/signup.php',
|
||||||
await CRUD().post(
|
payload: payload,
|
||||||
link: '${AppLink.seferGizaServer}/auth/signup.php',
|
),
|
||||||
payload: payload,
|
CRUD().post(
|
||||||
);
|
link: '${AppLink.seferGizaServer}/auth/signup.php',
|
||||||
|
payload: payload,
|
||||||
|
)
|
||||||
|
];
|
||||||
|
await Future.wait(signUp);
|
||||||
|
}
|
||||||
|
|
||||||
box.write(BoxName.isVerified, '1');
|
box.write(BoxName.isVerified, '1');
|
||||||
box.write(BoxName.isFirstTime, '0');
|
box.write(BoxName.isFirstTime, '0');
|
||||||
box.write(BoxName.phone, phoneController.text);
|
box.write(
|
||||||
|
BoxName.phone, encryptionHelper.encryptData(phoneController.text));
|
||||||
|
|
||||||
Get.put(LoginController()).loginUsingCredentials(
|
Get.put(LoginController()).loginUsingCredentials(
|
||||||
box.read(BoxName.passengerID).toString(),
|
box.read(BoxName.passengerID).toString(),
|
||||||
@@ -257,19 +269,23 @@ class RegisterController extends GetxController {
|
|||||||
try {
|
try {
|
||||||
if (formKey3.currentState!.validate()) {
|
if (formKey3.currentState!.validate()) {
|
||||||
var res = await CRUD().post(link: AppLink.verifyOtpMessage, payload: {
|
var res = await CRUD().post(link: AppLink.verifyOtpMessage, payload: {
|
||||||
'phone_number': phoneController.text,
|
'phone_number': encryptionHelper.encryptData(phoneController.text),
|
||||||
'token': verifyCode.text.toString(),
|
'token': encryptionHelper.encryptData(verifyCode.text.toString()),
|
||||||
});
|
});
|
||||||
|
|
||||||
if (res != 'failure') {
|
if (res != 'failure') {
|
||||||
box.write(BoxName.phoneDriver, phoneController.text);
|
box.write(BoxName.phone,
|
||||||
var nameParts = box.read(BoxName.name).toString().split(' ');
|
encryptionHelper.encryptData(phoneController.text));
|
||||||
|
var nameParts = encryptionHelper
|
||||||
|
.decryptData(box.read(BoxName.name))
|
||||||
|
.toString()
|
||||||
|
.split(' ');
|
||||||
var firstName = nameParts.isNotEmpty ? nameParts[0] : 'unknown';
|
var firstName = nameParts.isNotEmpty ? nameParts[0] : 'unknown';
|
||||||
var lastName = nameParts.length > 1 ? nameParts[1] : 'unknown';
|
var lastName = nameParts.length > 1 ? nameParts[1] : 'unknown';
|
||||||
|
|
||||||
var payload = {
|
var payload = {
|
||||||
'id': box.read(BoxName.passengerID),
|
'id': box.read(BoxName.passengerID),
|
||||||
'phone': phoneController.text,
|
'phone': encryptionHelper.decryptData(phoneController.text),
|
||||||
'email': box.read(BoxName.email),
|
'email': box.read(BoxName.email),
|
||||||
'password': 'unknown',
|
'password': 'unknown',
|
||||||
'gender': 'unknown',
|
'gender': 'unknown',
|
||||||
@@ -285,18 +301,24 @@ class RegisterController extends GetxController {
|
|||||||
);
|
);
|
||||||
|
|
||||||
if (res1 != 'failure') {
|
if (res1 != 'failure') {
|
||||||
await CRUD().post(
|
if (AppLink.seferAlexandriaServer != AppLink.seferCairoServer) {
|
||||||
link: '${AppLink.seferAlexandriaServer}/auth/signup.php',
|
List<Future> signUp = [
|
||||||
payload: payload,
|
CRUD().post(
|
||||||
);
|
link: '${AppLink.seferAlexandriaServer}/auth/signup.php',
|
||||||
await CRUD().post(
|
payload: payload,
|
||||||
link: '${AppLink.seferGizaServer}/auth/signup.php',
|
),
|
||||||
payload: payload,
|
CRUD().post(
|
||||||
);
|
link: '${AppLink.seferGizaServer}/auth/signup.php',
|
||||||
|
payload: payload,
|
||||||
|
)
|
||||||
|
];
|
||||||
|
await Future.wait(signUp);
|
||||||
|
}
|
||||||
|
|
||||||
box.write(BoxName.isVerified, '1');
|
box.write(BoxName.isVerified, '1');
|
||||||
box.write(BoxName.isFirstTime, '0');
|
box.write(BoxName.isFirstTime, '0');
|
||||||
box.write(BoxName.phone, phoneController.text);
|
box.write(BoxName.phone,
|
||||||
|
encryptionHelper.decryptData(phoneController.text));
|
||||||
|
|
||||||
Get.put(LoginController()).loginUsingCredentials(
|
Get.put(LoginController()).loginUsingCredentials(
|
||||||
box.read(BoxName.passengerID).toString(),
|
box.read(BoxName.passengerID).toString(),
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ import 'package:http/http.dart' as http;
|
|||||||
import '../../constant/box_name.dart';
|
import '../../constant/box_name.dart';
|
||||||
import '../../constant/links.dart';
|
import '../../constant/links.dart';
|
||||||
import '../../main.dart';
|
import '../../main.dart';
|
||||||
|
import '../functions/encrypt_decrypt.dart';
|
||||||
|
|
||||||
class TokenController extends GetxController {
|
class TokenController extends GetxController {
|
||||||
bool isloading = false;
|
bool isloading = false;
|
||||||
@@ -22,7 +23,8 @@ class TokenController extends GetxController {
|
|||||||
'Basic ${base64Encode(utf8.encode(basicAuthCredentials.toString()))}',
|
'Basic ${base64Encode(utf8.encode(basicAuthCredentials.toString()))}',
|
||||||
},
|
},
|
||||||
body: {
|
body: {
|
||||||
'token': box.read(BoxName.tokenFCM.toString()),
|
'token':
|
||||||
|
encryptionHelper.decryptData(box.read(BoxName.tokenFCM.toString())),
|
||||||
'passengerID': box.read(BoxName.passengerID).toString()
|
'passengerID': box.read(BoxName.passengerID).toString()
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
import 'dart:convert';
|
import 'dart:convert';
|
||||||
import 'dart:io';
|
import 'dart:io';
|
||||||
|
import 'package:SEFER/controller/functions/encrypt_decrypt.dart';
|
||||||
import 'package:firebase_messaging/firebase_messaging.dart';
|
import 'package:firebase_messaging/firebase_messaging.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
@@ -93,7 +94,8 @@ class FirebaseMessagesController extends GetxController {
|
|||||||
|
|
||||||
Future getToken() async {
|
Future getToken() async {
|
||||||
fcmToken.getToken().then((token) {
|
fcmToken.getToken().then((token) {
|
||||||
box.write(BoxName.tokenFCM, token);
|
box.write(
|
||||||
|
BoxName.tokenFCM, encryptionHelper.encryptData(token.toString()));
|
||||||
});
|
});
|
||||||
|
|
||||||
FirebaseMessaging.onMessage.listen((RemoteMessage message) {
|
FirebaseMessaging.onMessage.listen((RemoteMessage message) {
|
||||||
@@ -166,7 +168,8 @@ class FirebaseMessagesController extends GetxController {
|
|||||||
'token change'.tr, 'token change'.tr, 'cancel');
|
'token change'.tr, 'token change'.tr, 'cancel');
|
||||||
}
|
}
|
||||||
GoogleSignInHelper.signOut();
|
GoogleSignInHelper.signOut();
|
||||||
} else if (message.notification!.title! == 'Driver Is Going To Passenger'.tr) {
|
} else if (message.notification!.title! ==
|
||||||
|
'Driver Is Going To Passenger'.tr) {
|
||||||
Get.find<MapPassengerController>().isDriverInPassengerWay = true;
|
Get.find<MapPassengerController>().isDriverInPassengerWay = true;
|
||||||
Get.find<MapPassengerController>().update();
|
Get.find<MapPassengerController>().update();
|
||||||
if (Platform.isAndroid) {
|
if (Platform.isAndroid) {
|
||||||
|
|||||||
@@ -30,7 +30,9 @@ class CRUD {
|
|||||||
'Basic ${base64Encode(utf8.encode(AK.basicAuthCredentials.toString()))}',
|
'Basic ${base64Encode(utf8.encode(AK.basicAuthCredentials.toString()))}',
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
// Log.print('req: ${response.request}');
|
||||||
|
// Log.print('response: ${response.body}');
|
||||||
|
// Log.print('payload: ${payload}');
|
||||||
// if (response.statusCode == 200) {
|
// if (response.statusCode == 200) {
|
||||||
var jsonData = jsonDecode(response.body);
|
var jsonData = jsonDecode(response.body);
|
||||||
if (jsonData['status'] == 'success') {
|
if (jsonData['status'] == 'success') {
|
||||||
@@ -40,6 +42,46 @@ class CRUD {
|
|||||||
return jsonData['status'];
|
return jsonData['status'];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Future<dynamic> post({
|
||||||
|
required String link,
|
||||||
|
Map<String, dynamic>? payload,
|
||||||
|
}) async {
|
||||||
|
var url = Uri.parse(link);
|
||||||
|
try {
|
||||||
|
var response = await http.post(
|
||||||
|
url,
|
||||||
|
body: payload,
|
||||||
|
headers: {
|
||||||
|
"Content-Type": "application/x-www-form-urlencoded",
|
||||||
|
'Authorization':
|
||||||
|
'Basic ${base64Encode(utf8.encode(AK.basicAuthCredentials))}',
|
||||||
|
},
|
||||||
|
);
|
||||||
|
|
||||||
|
if (response.statusCode == 200) {
|
||||||
|
try {
|
||||||
|
var jsonData = jsonDecode(response.body);
|
||||||
|
|
||||||
|
if (jsonData['status'] == 'success') {
|
||||||
|
return jsonData;
|
||||||
|
} else {
|
||||||
|
return jsonData['status'];
|
||||||
|
}
|
||||||
|
} catch (e) {
|
||||||
|
addError(e.toString(), 'crud().post');
|
||||||
|
return 'failure'; // Return a recognizable failure string for JSON errors
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
addError(
|
||||||
|
'Non-200 response code: ${response.statusCode}', 'crud().post');
|
||||||
|
return 'failure'; // Handle unexpected status codes as failures
|
||||||
|
}
|
||||||
|
} catch (e) {
|
||||||
|
addError('HTTP request error: $e', 'crud().post');
|
||||||
|
return 'failure'; // Handle HTTP request errors as failures
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Future<dynamic> getTokenParent({
|
Future<dynamic> getTokenParent({
|
||||||
required String link,
|
required String link,
|
||||||
Map<String, dynamic>? payload,
|
Map<String, dynamic>? payload,
|
||||||
@@ -298,45 +340,6 @@ class CRUD {
|
|||||||
// return response.statusCode;
|
// return response.statusCode;
|
||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
Future<dynamic> post({
|
|
||||||
required String link,
|
|
||||||
Map<String, dynamic>? payload,
|
|
||||||
}) async {
|
|
||||||
var url = Uri.parse(link);
|
|
||||||
try {
|
|
||||||
var response = await http.post(
|
|
||||||
url,
|
|
||||||
body: payload,
|
|
||||||
headers: {
|
|
||||||
"Content-Type": "application/x-www-form-urlencoded",
|
|
||||||
'Authorization':
|
|
||||||
'Basic ${base64Encode(utf8.encode(AK.basicAuthCredentials))}',
|
|
||||||
},
|
|
||||||
);
|
|
||||||
|
|
||||||
if (response.statusCode == 200) {
|
|
||||||
try {
|
|
||||||
var jsonData = jsonDecode(response.body);
|
|
||||||
|
|
||||||
if (jsonData['status'] == 'success') {
|
|
||||||
return jsonData;
|
|
||||||
} else {
|
|
||||||
return jsonData['status'];
|
|
||||||
}
|
|
||||||
} catch (e) {
|
|
||||||
addError(e.toString(), 'crud().post');
|
|
||||||
return 'failure'; // Return a recognizable failure string for JSON errors
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
addError(
|
|
||||||
'Non-200 response code: ${response.statusCode}', 'crud().post');
|
|
||||||
return 'failure'; // Handle unexpected status codes as failures
|
|
||||||
}
|
|
||||||
} catch (e) {
|
|
||||||
addError('HTTP request error: $e', 'crud().post');
|
|
||||||
return 'failure'; // Handle HTTP request errors as failures
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Future<dynamic> postPayMob({
|
Future<dynamic> postPayMob({
|
||||||
required String link,
|
required String link,
|
||||||
|
|||||||
52
lib/controller/functions/encrypt_decrypt.dart
Normal file
@@ -0,0 +1,52 @@
|
|||||||
|
import 'package:encrypt/encrypt.dart' as encrypt;
|
||||||
|
import 'package:flutter/foundation.dart';
|
||||||
|
|
||||||
|
import '../../env/env.dart';
|
||||||
|
|
||||||
|
var secretKey = Env.keyOfApp
|
||||||
|
.toString()
|
||||||
|
.split('XrXlBl')[0]; // Must be 16 characters for AES-128
|
||||||
|
String initializationVector = Env.initializationVector; // Must be 16 characters
|
||||||
|
final encryptionHelper = EncryptionHelper(
|
||||||
|
secretKey: secretKey,
|
||||||
|
initializationVector: initializationVector,
|
||||||
|
);
|
||||||
|
|
||||||
|
class EncryptionHelper {
|
||||||
|
final encrypt.Key key;
|
||||||
|
final encrypt.IV iv;
|
||||||
|
|
||||||
|
EncryptionHelper(
|
||||||
|
{required String secretKey, required String initializationVector})
|
||||||
|
: key = encrypt.Key.fromUtf8(secretKey),
|
||||||
|
iv = encrypt.IV.fromUtf8(initializationVector);
|
||||||
|
|
||||||
|
// Initialize the helper
|
||||||
|
|
||||||
|
/// Encrypts the given plain text
|
||||||
|
String encryptData(String plainText) {
|
||||||
|
try {
|
||||||
|
final encrypter = encrypt.Encrypter(encrypt.AES(key,
|
||||||
|
mode: encrypt.AESMode.cbc)); // Explicitly use CBC mode
|
||||||
|
final encrypted = encrypter.encrypt(plainText, iv: iv);
|
||||||
|
return encrypted.base64;
|
||||||
|
} catch (e) {
|
||||||
|
debugPrint('Encryption Error: $e');
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Decrypts the given encrypted text
|
||||||
|
String decryptData(String encryptedText) {
|
||||||
|
try {
|
||||||
|
final encrypter = encrypt.Encrypter(encrypt.AES(key,
|
||||||
|
mode: encrypt.AESMode.cbc)); // Explicitly use CBC mode
|
||||||
|
final encrypted = encrypt.Encrypted.fromBase64(encryptedText);
|
||||||
|
final decrypted = encrypter.decrypt(encrypted, iv: iv);
|
||||||
|
return decrypted;
|
||||||
|
} catch (e) {
|
||||||
|
debugPrint('Decryption Error: $e');
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,64 +0,0 @@
|
|||||||
// import 'dart:async';
|
|
||||||
// import 'package:background_location/background_location.dart';
|
|
||||||
// import 'package:get/get.dart';
|
|
||||||
// import 'package:permission_handler/permission_handler.dart';
|
|
||||||
|
|
||||||
// class LocationBackgroundController extends GetxController {
|
|
||||||
// @override
|
|
||||||
// void onInit() {
|
|
||||||
// super.onInit();
|
|
||||||
// requestLocationPermission();
|
|
||||||
// configureBackgroundLocation();
|
|
||||||
// }
|
|
||||||
|
|
||||||
// Future<void> requestLocationPermission() async {
|
|
||||||
// var status = await Permission.locationAlways.status;
|
|
||||||
// if (!status.isGranted) {
|
|
||||||
// await Permission.locationAlways.request();
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
// Future<void> configureBackgroundLocation() async {
|
|
||||||
// await BackgroundLocation.setAndroidNotification(
|
|
||||||
// title: "Background Location",
|
|
||||||
// message: "Tracking location...",
|
|
||||||
// icon: "@mipmap/ic_launcher",
|
|
||||||
// );
|
|
||||||
|
|
||||||
// BackgroundLocation.setAndroidConfiguration(1000);
|
|
||||||
// BackgroundLocation.startLocationService();
|
|
||||||
// BackgroundLocation.getLocationUpdates((location) {
|
|
||||||
// // Handle location updates here
|
|
||||||
// });
|
|
||||||
// }
|
|
||||||
|
|
||||||
// startBackLocation() async {
|
|
||||||
// Timer.periodic(const Duration(seconds: 5), (timer) {
|
|
||||||
// getBackgroundLocation();
|
|
||||||
// });
|
|
||||||
// }
|
|
||||||
|
|
||||||
// getBackgroundLocation() async {
|
|
||||||
// var status = await Permission.locationAlways.status;
|
|
||||||
// if (status.isGranted) {
|
|
||||||
// await BackgroundLocation.startLocationService(
|
|
||||||
// distanceFilter: 20, forceAndroidLocationManager: true);
|
|
||||||
// BackgroundLocation.setAndroidConfiguration(
|
|
||||||
// Duration.microsecondsPerSecond); // Set interval to 5 seconds
|
|
||||||
|
|
||||||
// BackgroundLocation.getLocationUpdates((location1) {
|
|
||||||
// Latitude: ${location1.latitude.toString()}
|
|
||||||
// Longitude: ${location1.longitude.toString()}
|
|
||||||
// Altitude: ${location1.altitude.toString()}
|
|
||||||
// Accuracy: ${location1.accuracy.toString()}
|
|
||||||
// Bearing: ${location1.bearing.toString()}
|
|
||||||
// Speed: ${location1.speed.toString()}
|
|
||||||
|
|
||||||
|
|
||||||
// ''');
|
|
||||||
// });
|
|
||||||
// } else {
|
|
||||||
// await Permission.locationAlways.request();
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
@@ -1,10 +1,13 @@
|
|||||||
import 'dart:convert';
|
import 'dart:convert';
|
||||||
|
|
||||||
|
import 'package:SEFER/constant/box_name.dart';
|
||||||
import 'package:flutter_secure_storage/flutter_secure_storage.dart';
|
import 'package:flutter_secure_storage/flutter_secure_storage.dart';
|
||||||
|
|
||||||
import '../../constant/links.dart';
|
import '../../constant/links.dart';
|
||||||
import '../../main.dart';
|
import '../../main.dart';
|
||||||
|
import '../../print.dart';
|
||||||
import 'crud.dart';
|
import 'crud.dart';
|
||||||
|
import 'encrypt_decrypt.dart';
|
||||||
|
|
||||||
class SecureStorage {
|
class SecureStorage {
|
||||||
final FlutterSecureStorage _storage = const FlutterSecureStorage();
|
final FlutterSecureStorage _storage = const FlutterSecureStorage();
|
||||||
@@ -28,31 +31,47 @@ const List<String> keysToFetch = [
|
|||||||
];
|
];
|
||||||
|
|
||||||
class AppInitializer {
|
class AppInitializer {
|
||||||
// final FlutterSecureStorage _storage = const FlutterSecureStorage();
|
List<Map<String, dynamic>> links = [];
|
||||||
|
|
||||||
Future<void> initializeApp() async {
|
Future<void> initializeApp() async {
|
||||||
// Check if app is running for the first time
|
await getKey();
|
||||||
|
await getAIKey('FCM_PRIVATE_KEY');
|
||||||
// Loop through the keys and fetch their values
|
|
||||||
for (String key in keysToFetch) {
|
|
||||||
try {
|
|
||||||
String? value = await getKey(key); // Fetch from server
|
|
||||||
if (value != null) {
|
|
||||||
await box.write(key, value); // Save securely
|
|
||||||
}
|
|
||||||
} catch (e) {}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<String?> getKey(String key) async {
|
getAIKey(String key) async {
|
||||||
var res =
|
var res =
|
||||||
await CRUD().get(link: AppLink.getapiKey, payload: {"keyName": key});
|
await CRUD().get(link: AppLink.getapiKey, payload: {"keyName": key});
|
||||||
if (res != 'failure') {
|
if (res != 'failure') {
|
||||||
try {
|
var d = jsonDecode(res)['message'];
|
||||||
var data = jsonDecode(res)['message'];
|
storage.write(key: 'FCM_PRIVATE_KEY', value: d[key].toString());
|
||||||
return data[key]?.toString();
|
// return d[key].toString();
|
||||||
} catch (e) {}
|
} else {}
|
||||||
|
}
|
||||||
|
|
||||||
|
Future<void> getKey() async {
|
||||||
|
try {
|
||||||
|
var res =
|
||||||
|
await CRUD().get(link: AppLink.getLocationAreaLinks, payload: {});
|
||||||
|
// Log.print('res: ${res}');
|
||||||
|
if (res != 'failure') {
|
||||||
|
links = List<Map<String, dynamic>>.from(jsonDecode(res)['message']);
|
||||||
|
await box.remove(BoxName.locationName);
|
||||||
|
await box.remove(BoxName.basicLink);
|
||||||
|
await box.remove(links[4]['name']);
|
||||||
|
await box.remove(links[1]['name']);
|
||||||
|
await box.remove(links[2]['name']);
|
||||||
|
await box.write(BoxName.locationName, links);
|
||||||
|
await box.write(BoxName.basicLink,
|
||||||
|
encryptionHelper.decryptData(links[0]['server_link']));
|
||||||
|
await box.write(links[2]['name'],
|
||||||
|
encryptionHelper.decryptData(links[2]['server_link']));
|
||||||
|
await box.write(links[1]['name'],
|
||||||
|
encryptionHelper.decryptData(links[1]['server_link']));
|
||||||
|
await box.write(BoxName.paymentLink,
|
||||||
|
encryptionHelper.decryptData(links[4]['server_link']));
|
||||||
|
}
|
||||||
|
} catch (e) {
|
||||||
|
print('Error fetching or decoding location data: $e');
|
||||||
}
|
}
|
||||||
return null;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import 'dart:math' as math;
|
|||||||
import 'dart:ui';
|
import 'dart:ui';
|
||||||
import 'package:SEFER/constant/univeries_polygon.dart';
|
import 'package:SEFER/constant/univeries_polygon.dart';
|
||||||
import 'package:SEFER/controller/firebase/local_notification.dart';
|
import 'package:SEFER/controller/firebase/local_notification.dart';
|
||||||
|
import 'package:SEFER/controller/functions/encrypt_decrypt.dart';
|
||||||
import 'package:flutter/cupertino.dart';
|
import 'package:flutter/cupertino.dart';
|
||||||
import 'package:flutter_confetti/flutter_confetti.dart';
|
import 'package:flutter_confetti/flutter_confetti.dart';
|
||||||
import 'package:vector_math/vector_math.dart' show radians, degrees;
|
import 'package:vector_math/vector_math.dart' show radians, degrees;
|
||||||
@@ -542,12 +543,12 @@ class MapPassengerController extends GetxController {
|
|||||||
|
|
||||||
void sendSMS(String to) async {
|
void sendSMS(String to) async {
|
||||||
// Get the driver's phone number.
|
// Get the driver's phone number.
|
||||||
String driverPhone =
|
String driverPhone = encryptionHelper.decryptData(
|
||||||
dataCarsLocationByPassenger['message'][carsOrder]['phone'].toString();
|
dataCarsLocationByPassenger['message'][carsOrder]['phone'].toString());
|
||||||
|
|
||||||
// Format the message.
|
// Format the message.
|
||||||
String message =
|
String message =
|
||||||
'Hi! This is ${box.read(BoxName.name)}.\n I am using ${box.read(AppInformation.appName)} to ride with $passengerName as the driver. $passengerName \nis driving a $model\n with license plate $licensePlate.\n I am currently located at $passengerLocation.\n If you need to reach me, please contact the driver directly at\n\n $driverPhone.';
|
'Hi! This is ${encryptionHelper.decryptData(box.read(BoxName.name).toString().split(' ')[0]).toString()}.\n I am using ${box.read(AppInformation.appName)} to ride with $passengerName as the driver. $passengerName \nis driving a $model\n with license plate $licensePlate.\n I am currently located at $passengerLocation.\n If you need to reach me, please contact the driver directly at\n\n $driverPhone.';
|
||||||
|
|
||||||
// Launch the URL to send the SMS.
|
// Launch the URL to send the SMS.
|
||||||
launchCommunication('sms', to, message);
|
launchCommunication('sms', to, message);
|
||||||
@@ -559,7 +560,7 @@ class MapPassengerController extends GetxController {
|
|||||||
|
|
||||||
// Format the message.
|
// Format the message.
|
||||||
String message =
|
String message =
|
||||||
'${'${'Hi! This is'.tr} ${box.read(BoxName.name)}.\n${' I am using'.tr}'} ${AppInformation.appName}${' to ride with'.tr} $passengerName${' as the driver.'.tr} $passengerName \n${'is driving a '.tr}$model\n${' with license plate '.tr}$licensePlate.\n${' I am currently located at '.tr} https://www.google.com/maps/place/${passengerLocation.latitude},${passengerLocation.longitude}.\n${' If you need to reach me, please contact the driver directly at'.tr}\n\n $driverPhone.';
|
'${'${'Hi! This is'.tr} ${encryptionHelper.decryptData(box.read(BoxName.name).toString().split(' ')[0]).toString()}.\n${' I am using'.tr}'} ${AppInformation.appName}${' to ride with'.tr} $passengerName${' as the driver.'.tr} $passengerName \n${'is driving a '.tr}$model\n${' with license plate '.tr}$licensePlate.\n${' I am currently located at '.tr} https://www.google.com/maps/place/${passengerLocation.latitude},${passengerLocation.longitude}.\n${' If you need to reach me, please contact the driver directly at'.tr}\n\n $driverPhone.';
|
||||||
|
|
||||||
// Launch the URL to send the WhatsApp message.
|
// Launch the URL to send the WhatsApp message.
|
||||||
launchCommunication('whatsapp', to, message);
|
launchCommunication('whatsapp', to, message);
|
||||||
@@ -1958,7 +1959,7 @@ class MapPassengerController extends GetxController {
|
|||||||
FirebaseMessagesController().sendNotificationToDriverMAP(
|
FirebaseMessagesController().sendNotificationToDriverMAP(
|
||||||
'Order'.tr,
|
'Order'.tr,
|
||||||
endNameAddress,
|
endNameAddress,
|
||||||
driverData['token'].toString(),
|
encryptionHelper.decryptData(driverData['token'].toString()),
|
||||||
body,
|
body,
|
||||||
'order.wav');
|
'order.wav');
|
||||||
}
|
}
|
||||||
@@ -1979,13 +1980,15 @@ class MapPassengerController extends GetxController {
|
|||||||
distance.toStringAsFixed(2),
|
distance.toStringAsFixed(2),
|
||||||
driverData['driver_id'].toString(),
|
driverData['driver_id'].toString(),
|
||||||
box.read(BoxName.passengerID).toString(),
|
box.read(BoxName.passengerID).toString(),
|
||||||
box.read(BoxName.name).toString(),
|
encryptionHelper
|
||||||
box.read(BoxName.tokenFCM).toString(),
|
.decryptData(box.read(BoxName.name).toString().split(' ')[0])
|
||||||
box.read(BoxName.phone).toString(),
|
.toString(),
|
||||||
|
encryptionHelper.decryptData(box.read(BoxName.tokenFCM).toString()),
|
||||||
|
encryptionHelper.decryptData(box.read(BoxName.phone).toString()),
|
||||||
durationToPassenger.toStringAsFixed(0) ?? '120',
|
durationToPassenger.toStringAsFixed(0) ?? '120',
|
||||||
distanceByPassenger.toString() ?? '2000',
|
distanceByPassenger.toString() ?? '2000',
|
||||||
paymentController.isWalletChecked.toString(),
|
paymentController.isWalletChecked.toString(),
|
||||||
driverData['token'].toString(),
|
encryptionHelper.decryptData(driverData['token'].toString()),
|
||||||
durationToPassenger.toString(),
|
durationToPassenger.toString(),
|
||||||
rideId.toString(),
|
rideId.toString(),
|
||||||
rideTimerBegin.toString(),
|
rideTimerBegin.toString(),
|
||||||
@@ -2183,16 +2186,19 @@ class MapPassengerController extends GetxController {
|
|||||||
var response = jsonDecode(res);
|
var response = jsonDecode(res);
|
||||||
Log.print('getUpdatedRideForDriverApply: $response');
|
Log.print('getUpdatedRideForDriverApply: $response');
|
||||||
driverId = response['data']['driver_id'];
|
driverId = response['data']['driver_id'];
|
||||||
driverPhone = response['data']['phone'];
|
driverPhone = encryptionHelper.decryptData(response['data']['phone']);
|
||||||
driverCarMake = response['data']['make'];
|
driverCarMake = response['data']['make'];
|
||||||
model = response['data']['model'];
|
model = response['data']['model'];
|
||||||
colorHex = response['data']['color_hex'];
|
colorHex = response['data']['color_hex'];
|
||||||
carColor = response['data']['color'];
|
carColor = response['data']['color'];
|
||||||
make = response['data']['make'];
|
make = response['data']['make'];
|
||||||
licensePlate = response['data']['car_plate'];
|
licensePlate =
|
||||||
passengerName = response['data']['passengerName'];
|
encryptionHelper.decryptData(response['data']['car_plate']);
|
||||||
driverName = response['data']['driverName'].toString();
|
passengerName =
|
||||||
driverToken = response['data']['token'];
|
encryptionHelper.decryptData(response['data']['passengerName']);
|
||||||
|
driverName = encryptionHelper
|
||||||
|
.decryptData(response['data']['driverName'].toString());
|
||||||
|
driverToken = encryptionHelper.decryptData(response['data']['token']);
|
||||||
// Log.print('driverToken updated: $driverToken');
|
// Log.print('driverToken updated: $driverToken');
|
||||||
carYear = response['data']['year'];
|
carYear = response['data']['year'];
|
||||||
driverRate = response['data']['ratingDriver'].toString();
|
driverRate = response['data']['ratingDriver'].toString();
|
||||||
@@ -2420,31 +2426,69 @@ class MapPassengerController extends GetxController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
String getLocationArea(double latitude, double longitude) {
|
String getLocationArea(double latitude, double longitude) {
|
||||||
if (latitude >= 29.918901 &&
|
final locations = box.read(BoxName.locationName) ?? [];
|
||||||
latitude <= 30.198857 &&
|
for (final location in locations) {
|
||||||
longitude >= 31.215009 &&
|
final locationData = location as Map<String, dynamic>;
|
||||||
longitude <= 31.532186) {
|
|
||||||
box.write(BoxName.serverChosen, AppLink.seferCairoServer);
|
|
||||||
|
|
||||||
return 'Cairo';
|
// Debugging: Print location data
|
||||||
} else if (latitude >= 29.904975 &&
|
// print('Location Data: $locationData');
|
||||||
latitude <= 30.143372 &&
|
|
||||||
longitude >= 30.787030 &&
|
// Convert string values to double
|
||||||
longitude <= 31.215009) {
|
final minLatitude =
|
||||||
box.write(BoxName.serverChosen, AppLink.seferGizaServer);
|
double.tryParse(locationData['min_latitude'].toString()) ?? 0.0;
|
||||||
return 'Giza';
|
final maxLatitude =
|
||||||
} else if (latitude >= 30.396286 &&
|
double.tryParse(locationData['max_latitude'].toString()) ?? 0.0;
|
||||||
latitude <= 31.654458 &&
|
final minLongitude =
|
||||||
longitude >= 29.041139 &&
|
double.tryParse(locationData['min_longitude'].toString()) ?? 0.0;
|
||||||
longitude <= 32.626259) {
|
final maxLongitude =
|
||||||
box.write(BoxName.serverChosen, AppLink.seferAlexandriaServer);
|
double.tryParse(locationData['max_longitude'].toString()) ?? 0.0;
|
||||||
return 'Alexandria';
|
|
||||||
} else {
|
// Debugging: Print converted values
|
||||||
box.write(BoxName.serverChosen, AppLink.seferCairoServer);
|
print(
|
||||||
return 'Cairo';
|
'Converted Values: minLatitude=$minLatitude, maxLatitude=$maxLatitude, minLongitude=$minLongitude, maxLongitude=$maxLongitude');
|
||||||
|
|
||||||
|
if (latitude >= minLatitude &&
|
||||||
|
latitude <= maxLatitude &&
|
||||||
|
longitude >= minLongitude &&
|
||||||
|
longitude <= maxLongitude) {
|
||||||
|
box.write(BoxName.serverChosen,
|
||||||
|
encryptionHelper.decryptData(locationData['server_link']));
|
||||||
|
// Log.print(
|
||||||
|
// 'locationData----server_link: ${encryptionHelper.decryptData(locationData['server_link'])}');
|
||||||
|
return locationData['name'];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Default case
|
||||||
|
box.write(BoxName.serverChosen, AppLink.seferCairoServer);
|
||||||
|
return 'Cairo';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// if (latitude >= 29.918901 &&
|
||||||
|
// latitude <= 30.198857 &&
|
||||||
|
// longitude >= 31.215009 &&
|
||||||
|
// longitude <= 31.532186) {
|
||||||
|
// box.write(BoxName.serverChosen, AppLink.seferCairoServer);
|
||||||
|
|
||||||
|
// return 'Cairo';
|
||||||
|
// } else if (latitude >= 29.904975 &&
|
||||||
|
// latitude <= 30.143372 &&
|
||||||
|
// longitude >= 30.787030 &&
|
||||||
|
// longitude <= 31.215009) {
|
||||||
|
// box.write(BoxName.serverChosen, AppLink.seferGizaServer);
|
||||||
|
// return 'Giza';
|
||||||
|
// } else if (latitude >= 30.396286 &&
|
||||||
|
// latitude <= 31.654458 &&
|
||||||
|
// longitude >= 29.041139 &&
|
||||||
|
// longitude <= 32.626259) {
|
||||||
|
// box.write(BoxName.serverChosen, AppLink.seferAlexandriaServer);
|
||||||
|
// return 'Alexandria';
|
||||||
|
// } else {
|
||||||
|
// box.write(BoxName.serverChosen, AppLink.seferCairoServer);
|
||||||
|
// return 'Cairo';
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
Future<bool> getCarsLocationByPassengerAndReloadMarker(
|
Future<bool> getCarsLocationByPassengerAndReloadMarker(
|
||||||
String carType, int boundIncreaseStep) async {
|
String carType, int boundIncreaseStep) async {
|
||||||
// if (statusRide == 'wait') {
|
// if (statusRide == 'wait') {
|
||||||
@@ -2565,7 +2609,7 @@ class MapPassengerController extends GetxController {
|
|||||||
_getIconForCar(json),
|
_getIconForCar(json),
|
||||||
);
|
);
|
||||||
|
|
||||||
driversToken.add(json['token']);
|
driversToken.add(encryptionHelper.decryptData(json['token']));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Add fake car markers
|
// Add fake car markers
|
||||||
@@ -2845,7 +2889,7 @@ class MapPassengerController extends GetxController {
|
|||||||
style: AppStyle.title,
|
style: AppStyle.title,
|
||||||
),
|
),
|
||||||
Text(
|
Text(
|
||||||
"Send Sefer app to him".tr,
|
"Send SPEED app to him".tr,
|
||||||
style: AppStyle.title.copyWith(color: AppColor.greenColor),
|
style: AppStyle.title.copyWith(color: AppColor.greenColor),
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
@@ -2859,7 +2903,7 @@ class MapPassengerController extends GetxController {
|
|||||||
: '+962${box.read(BoxName.sosPhonePassenger)}';
|
: '+962${box.read(BoxName.sosPhonePassenger)}';
|
||||||
var message = '''Dear ,
|
var message = '''Dear ,
|
||||||
|
|
||||||
🚀 I have just started an exciting trip and I would like to share the details of my journey and my current location with you in real-time! Please download the SEFER app. It will allow you to view my trip details and my latest location.
|
🚀 I have just started an exciting trip and I would like to share the details of my journey and my current location with you in real-time! Please download the SPEED app. It will allow you to view my trip details and my latest location.
|
||||||
|
|
||||||
👉 Download link:
|
👉 Download link:
|
||||||
Android [https://play.google.com/store/apps/details?id=com.mobileapp.store.ride]
|
Android [https://play.google.com/store/apps/details?id=com.mobileapp.store.ride]
|
||||||
@@ -2867,7 +2911,7 @@ class MapPassengerController extends GetxController {
|
|||||||
|
|
||||||
I look forward to keeping you close during my adventure!
|
I look forward to keeping you close during my adventure!
|
||||||
|
|
||||||
SEFER ,'''
|
SPEED ,'''
|
||||||
.tr;
|
.tr;
|
||||||
launchCommunication('whatsapp', phone, message);
|
launchCommunication('whatsapp', phone, message);
|
||||||
}),
|
}),
|
||||||
@@ -2877,7 +2921,7 @@ class MapPassengerController extends GetxController {
|
|||||||
Get.back();
|
Get.back();
|
||||||
}));
|
}));
|
||||||
} else if (res1['status'] == 'success') {
|
} else if (res1['status'] == 'success') {
|
||||||
var tokenParent = res1['data'][0]['token'];
|
var tokenParent = encryptionHelper.decryptData(res1['data'][0]['token']);
|
||||||
Get.snackbar("The invitation was sent successfully".tr, '',
|
Get.snackbar("The invitation was sent successfully".tr, '',
|
||||||
backgroundColor: AppColor.greenColor);
|
backgroundColor: AppColor.greenColor);
|
||||||
FirebaseMessagesController().sendNotificationToPassengerToken(
|
FirebaseMessagesController().sendNotificationToPassengerToken(
|
||||||
@@ -3160,7 +3204,7 @@ class MapPassengerController extends GetxController {
|
|||||||
} else {
|
} else {
|
||||||
isMainBottomMenuMap = !isMainBottomMenuMap;
|
isMainBottomMenuMap = !isMainBottomMenuMap;
|
||||||
mainBottomMenuMapHeight =
|
mainBottomMenuMapHeight =
|
||||||
isMainBottomMenuMap == true ? Get.height * .2 : Get.height * .7;
|
isMainBottomMenuMap == true ? Get.height * .2 : Get.height * .6;
|
||||||
isWayPointSheet = false;
|
isWayPointSheet = false;
|
||||||
if (heightMenuBool == true) {
|
if (heightMenuBool == true) {
|
||||||
getDrawerMenu();
|
getDrawerMenu();
|
||||||
@@ -3646,18 +3690,6 @@ class MapPassengerController extends GetxController {
|
|||||||
update();
|
update();
|
||||||
}
|
}
|
||||||
|
|
||||||
// LatLngBounds calculateBounds(double lat, double lng, double radiusInMeters) {
|
|
||||||
// const double earthRadius = 6378137.0; // Earth's radius in meters
|
|
||||||
|
|
||||||
// double latDelta = radiusInMeters / earthRadius * (180 / pi);
|
|
||||||
// double lngDelta =
|
|
||||||
// radiusInMeters / (earthRadius * cos(pi * lat / 180)) * (180 / pi);
|
|
||||||
|
|
||||||
// return LatLngBounds(
|
|
||||||
// southwest: LatLng(lat - latDelta, lng - lngDelta),
|
|
||||||
// northeast: LatLng(lat + latDelta, lng + lngDelta),
|
|
||||||
// );
|
|
||||||
// }
|
|
||||||
LatLngBounds calculateBounds(double lat, double lng, double radiusInMeters) {
|
LatLngBounds calculateBounds(double lat, double lng, double radiusInMeters) {
|
||||||
const double earthRadius = 6378137.0; // Earth's radius in meters
|
const double earthRadius = 6378137.0; // Earth's radius in meters
|
||||||
|
|
||||||
@@ -4018,8 +4050,14 @@ class MapPassengerController extends GetxController {
|
|||||||
late LatLngBounds boundsData;
|
late LatLngBounds boundsData;
|
||||||
late String startNameAddress = '';
|
late String startNameAddress = '';
|
||||||
late String endNameAddress = '';
|
late String endNameAddress = '';
|
||||||
|
List<Map<String, dynamic>> stopPoints = [];
|
||||||
|
void removeStop(Map<String, dynamic> stop) {
|
||||||
|
stopPoints.remove(stop);
|
||||||
|
update(); // Trigger a rebuild of the UI
|
||||||
|
}
|
||||||
|
|
||||||
getDirectionMap(String origin, destination) async {
|
getDirectionMap(String origin, destination,
|
||||||
|
[List<String> waypoints = const []]) async {
|
||||||
isLoading = true;
|
isLoading = true;
|
||||||
update();
|
update();
|
||||||
remainingTime = 25; //to make cancel every call
|
remainingTime = 25; //to make cancel every call
|
||||||
@@ -4039,7 +4077,10 @@ class MapPassengerController extends GetxController {
|
|||||||
update();
|
update();
|
||||||
var url =
|
var url =
|
||||||
('${AppLink.googleMapsLink}directions/json?&language=${box.read(BoxName.lang) ?? 'ar'}&avoid=tolls|ferries&destination=$destination&origin=$origin&key=${AK.mapAPIKEY}');
|
('${AppLink.googleMapsLink}directions/json?&language=${box.read(BoxName.lang) ?? 'ar'}&avoid=tolls|ferries&destination=$destination&origin=$origin&key=${AK.mapAPIKEY}');
|
||||||
|
if (waypoints.isNotEmpty) {
|
||||||
|
String formattedWaypoints = waypoints.join('|');
|
||||||
|
url += '&waypoints=$formattedWaypoints';
|
||||||
|
}
|
||||||
var response = await CRUD().getGoogleApi(link: url, payload: {});
|
var response = await CRUD().getGoogleApi(link: url, payload: {});
|
||||||
data = response['routes'][0]['legs'];
|
data = response['routes'][0]['legs'];
|
||||||
box.remove(BoxName.tripData);
|
box.remove(BoxName.tripData);
|
||||||
@@ -5095,7 +5136,7 @@ class MapPassengerController extends GetxController {
|
|||||||
await FirebaseMessagesController().sendNotificationToDriverMAP(
|
await FirebaseMessagesController().sendNotificationToDriverMAP(
|
||||||
'OrderVIP',
|
'OrderVIP',
|
||||||
rideId.toString(),
|
rideId.toString(),
|
||||||
driver['token'].toString(),
|
encryptionHelper.decryptData(driver['token'].toString()),
|
||||||
[
|
[
|
||||||
id,
|
id,
|
||||||
rideId,
|
rideId,
|
||||||
@@ -5103,13 +5144,15 @@ class MapPassengerController extends GetxController {
|
|||||||
passengerLocation.latitude.toString(),
|
passengerLocation.latitude.toString(),
|
||||||
startNameAddress.toString(),
|
startNameAddress.toString(),
|
||||||
passengerLocation.longitude.toString(),
|
passengerLocation.longitude.toString(),
|
||||||
box.read(BoxName.name).toString(),
|
encryptionHelper
|
||||||
|
.decryptData(box.read(BoxName.name).toString().split(' ')[0])
|
||||||
|
.toString(),
|
||||||
box.read(BoxName.passengerID).toString(),
|
box.read(BoxName.passengerID).toString(),
|
||||||
box.read(BoxName.phone).toString(),
|
box.read(BoxName.phone).toString(),
|
||||||
box.read(BoxName.email).toString(),
|
box.read(BoxName.email).toString(),
|
||||||
box.read(BoxName.passengerPhotoUrl).toString(),
|
box.read(BoxName.passengerPhotoUrl).toString(),
|
||||||
box.read(BoxName.tokenFCM).toString(),
|
box.read(BoxName.tokenFCM).toString(),
|
||||||
driver['token'].toString(),
|
encryptionHelper.decryptData(driver['token'].toString()),
|
||||||
],
|
],
|
||||||
'order.wav');
|
'order.wav');
|
||||||
if (response['message'] == "Trip updated successfully") {
|
if (response['message'] == "Trip updated successfully") {
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import 'package:SEFER/constant/box_name.dart';
|
|||||||
import 'package:SEFER/constant/colors.dart';
|
import 'package:SEFER/constant/colors.dart';
|
||||||
import 'package:SEFER/constant/links.dart';
|
import 'package:SEFER/constant/links.dart';
|
||||||
import 'package:SEFER/controller/functions/crud.dart';
|
import 'package:SEFER/controller/functions/crud.dart';
|
||||||
|
import 'package:SEFER/controller/functions/encrypt_decrypt.dart';
|
||||||
import 'package:SEFER/controller/payment/payment_controller.dart';
|
import 'package:SEFER/controller/payment/payment_controller.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_contacts/flutter_contacts.dart';
|
import 'package:flutter_contacts/flutter_contacts.dart';
|
||||||
@@ -38,9 +39,9 @@ class InviteController extends GetxController {
|
|||||||
Future<void> shareDriverCode() async {
|
Future<void> shareDriverCode() async {
|
||||||
if (driverCouponCode != null) {
|
if (driverCouponCode != null) {
|
||||||
final String shareText = '''
|
final String shareText = '''
|
||||||
Join SEFER as a driver using my referral code!
|
Join SWIFTI as a driver using my referral code!
|
||||||
Use code: $driverCouponCode
|
Use code: $driverCouponCode
|
||||||
Download the SEFER Driver app now and earn rewards!
|
Download the SWIFTI Driver app now and earn rewards!
|
||||||
''';
|
''';
|
||||||
await Share.share(shareText);
|
await Share.share(shareText);
|
||||||
}
|
}
|
||||||
@@ -49,9 +50,9 @@ Download the SEFER Driver app now and earn rewards!
|
|||||||
Future<void> sharePassengerCode() async {
|
Future<void> sharePassengerCode() async {
|
||||||
if (couponCode != null) {
|
if (couponCode != null) {
|
||||||
final String shareText = '''
|
final String shareText = '''
|
||||||
Get a discount on your first SEFER ride!
|
Get a discount on your first SWIFTI ride!
|
||||||
Use my referral code: $couponCode
|
Use my referral code: $couponCode
|
||||||
Download the SEFER app now and enjoy your ride!
|
Download the SWIFTI app now and enjoy your ride!
|
||||||
''';
|
''';
|
||||||
await Share.share(shareText);
|
await Share.share(shareText);
|
||||||
}
|
}
|
||||||
@@ -175,12 +176,17 @@ Download the SEFER app now and enjoy your ride!
|
|||||||
|
|
||||||
void onSelectPassengerInvitation(int index) async {
|
void onSelectPassengerInvitation(int index) async {
|
||||||
MyDialog().getDialog(
|
MyDialog().getDialog(
|
||||||
driverInvitationDataToPassengers[index]['countOfInvitDriver'] < 2
|
int.parse(driverInvitationDataToPassengers[index]['countOfInvitDriver']
|
||||||
? '${'When'.tr} ${driverInvitationDataToPassengers[index]['passengerName']} ${"complete, you can claim your gift".tr} '
|
.toString()) <
|
||||||
|
2
|
||||||
|
? '${'When'.tr} ${encryptionHelper.decryptData(driverInvitationDataToPassengers[index]['passengerName'].toString())} ${"complete, you can claim your gift".tr} '
|
||||||
: 'You deserve the gift'.tr,
|
: 'You deserve the gift'.tr,
|
||||||
'${driverInvitationDataToPassengers[index]['passengerName']} ${driverInvitationDataToPassengers[index]['countOfInvitDriver']} / 2 ${'Trip'.tr}',
|
'${encryptionHelper.decryptData(driverInvitationDataToPassengers[index]['passengerName'].toString())} ${driverInvitationDataToPassengers[index]['countOfInvitDriver'].toString()} / 2 ${'Trip'.tr}',
|
||||||
() async {
|
() async {
|
||||||
if (driverInvitationDataToPassengers[index]['countOfInvitDriver'] < 2) {
|
if (int.parse(driverInvitationDataToPassengers[index]
|
||||||
|
['countOfInvitDriver']
|
||||||
|
.toString()) <
|
||||||
|
2) {
|
||||||
Get.back();
|
Get.back();
|
||||||
} else {
|
} else {
|
||||||
// Claim the gift if 100 trips are completed
|
// Claim the gift if 100 trips are completed
|
||||||
@@ -264,14 +270,14 @@ Download the SEFER app now and enjoy your ride!
|
|||||||
var response =
|
var response =
|
||||||
await CRUD().post(link: AppLink.addInvitationPassenger, payload: {
|
await CRUD().post(link: AppLink.addInvitationPassenger, payload: {
|
||||||
"driverId": box.read(BoxName.passengerID),
|
"driverId": box.read(BoxName.passengerID),
|
||||||
"inviterPassengerPhone": '+2$phoneNumber'
|
"inviterPassengerPhone": encryptionHelper.encryptData('+2$phoneNumber')
|
||||||
});
|
});
|
||||||
|
|
||||||
if (response != 'failure') {
|
if (response != 'failure') {
|
||||||
var d = response;
|
var d = response;
|
||||||
Get.snackbar('Success', 'Invite sent successfully'.tr);
|
Get.snackbar('Success', 'Invite sent successfully'.tr);
|
||||||
|
|
||||||
String message = '${'*SEFER APP CODE*'.tr}\n\n'
|
String message = '${'*SWIFTI APP CODE*'.tr}\n\n'
|
||||||
'${"Use this code in registration".tr}\n'
|
'${"Use this code in registration".tr}\n'
|
||||||
'${"To get a gift for both".tr}\n\n'
|
'${"To get a gift for both".tr}\n\n'
|
||||||
'${"The period of this code is 1 hour".tr}\n\n'
|
'${"The period of this code is 1 hour".tr}\n\n'
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ import 'package:get/get.dart';
|
|||||||
import 'package:intl/intl.dart';
|
import 'package:intl/intl.dart';
|
||||||
|
|
||||||
import '../functions/crud.dart';
|
import '../functions/crud.dart';
|
||||||
|
import '../functions/encrypt_decrypt.dart';
|
||||||
|
|
||||||
class VipOrderController extends GetxController {
|
class VipOrderController extends GetxController {
|
||||||
RxBool isLoading = false.obs;
|
RxBool isLoading = false.obs;
|
||||||
@@ -286,7 +287,12 @@ class VipWaittingPage extends StatelessWidget {
|
|||||||
? MyElevatedButton(
|
? MyElevatedButton(
|
||||||
title: "Click here to begin your trip\n\nGood luck, "
|
title: "Click here to begin your trip\n\nGood luck, "
|
||||||
.tr +
|
.tr +
|
||||||
box.read(BoxName.name).toString(),
|
encryptionHelper
|
||||||
|
.decryptData(box
|
||||||
|
.read(BoxName.name)
|
||||||
|
.toString()
|
||||||
|
.split(' ')[0])
|
||||||
|
.toString(),
|
||||||
kolor: AppColor.greenColor,
|
kolor: AppColor.greenColor,
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
final mapPassengerController =
|
final mapPassengerController =
|
||||||
|
|||||||
@@ -21,6 +21,7 @@ import '../../constant/links.dart';
|
|||||||
import '../../main.dart';
|
import '../../main.dart';
|
||||||
import '../../print.dart';
|
import '../../print.dart';
|
||||||
import '../functions/crud.dart';
|
import '../functions/crud.dart';
|
||||||
|
import '../functions/encrypt_decrypt.dart';
|
||||||
import '../functions/toast.dart';
|
import '../functions/toast.dart';
|
||||||
import 'paymob/paymob_wallet.dart';
|
import 'paymob/paymob_wallet.dart';
|
||||||
|
|
||||||
@@ -264,7 +265,10 @@ class PaymentController extends GetxController {
|
|||||||
merchantDisplayName: AppInformation.appName,
|
merchantDisplayName: AppInformation.appName,
|
||||||
billingDetails: BillingDetails(
|
billingDetails: BillingDetails(
|
||||||
name: box.read(BoxName.nameDriver) == null
|
name: box.read(BoxName.nameDriver) == null
|
||||||
? box.read(BoxName.name).toString()
|
? encryptionHelper
|
||||||
|
.decryptData(
|
||||||
|
box.read(BoxName.name).toString().split(' ')[0])
|
||||||
|
.toString()
|
||||||
: box.read(BoxName.nameDriver).toString(),
|
: box.read(BoxName.nameDriver).toString(),
|
||||||
email: box.read(BoxName.emailDriver) == null
|
email: box.read(BoxName.emailDriver) == null
|
||||||
? box.read(BoxName.email).toString()
|
? box.read(BoxName.email).toString()
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ import 'package:url_launcher/url_launcher.dart';
|
|||||||
import '../../constant/api_key.dart';
|
import '../../constant/api_key.dart';
|
||||||
import '../../main.dart';
|
import '../../main.dart';
|
||||||
import '../../print.dart';
|
import '../../print.dart';
|
||||||
|
import '../functions/encrypt_decrypt.dart';
|
||||||
|
|
||||||
class PaymobManager extends GetxController {
|
class PaymobManager extends GetxController {
|
||||||
String authanticationToken1 = "";
|
String authanticationToken1 = "";
|
||||||
@@ -134,10 +135,14 @@ class PaymobManager extends GetxController {
|
|||||||
"amount_cents": amount,
|
"amount_cents": amount,
|
||||||
"currency": currency,
|
"currency": currency,
|
||||||
"billing_data": {
|
"billing_data": {
|
||||||
"first_name": box.read(BoxName.name),
|
"first_name": encryptionHelper
|
||||||
"last_name": box.read(BoxName.name),
|
.decryptData(box.read(BoxName.name).toString().split(' ')[0])
|
||||||
"email": box.read(BoxName.email),
|
.toString(),
|
||||||
"phone_number": box.read(BoxName.phone),
|
"last_name": encryptionHelper
|
||||||
|
.decryptData(box.read(BoxName.name).toString().split(' ')[1])
|
||||||
|
.toString(),
|
||||||
|
"email": encryptionHelper.decryptData(box.read(BoxName.email)),
|
||||||
|
"phone_number": encryptionHelper.decryptData(box.read(BoxName.phone)),
|
||||||
"apartment": "NA",
|
"apartment": "NA",
|
||||||
"floor": "NA",
|
"floor": "NA",
|
||||||
"street": "NA",
|
"street": "NA",
|
||||||
|
|||||||
@@ -4,6 +4,8 @@ import 'package:dio/dio.dart';
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:webview_flutter/webview_flutter.dart';
|
import 'package:webview_flutter/webview_flutter.dart';
|
||||||
|
|
||||||
|
import '../../functions/encrypt_decrypt.dart';
|
||||||
|
|
||||||
class PaymobResponse {
|
class PaymobResponse {
|
||||||
bool success;
|
bool success;
|
||||||
String? transactionID;
|
String? transactionID;
|
||||||
@@ -224,9 +226,13 @@ class PaymobBillingData {
|
|||||||
Map<String, dynamic> toJson() {
|
Map<String, dynamic> toJson() {
|
||||||
return {
|
return {
|
||||||
"email": box.read(BoxName.email) ?? box.read(BoxName.emailDriver),
|
"email": box.read(BoxName.email) ?? box.read(BoxName.emailDriver),
|
||||||
"first_name": box.read(BoxName.name) ?? box.read(BoxName.nameDriver),
|
"first_name": encryptionHelper
|
||||||
"last_name": box.read(BoxName.name) ?? box.read(BoxName.nameDriver),
|
.decryptData(box.read(BoxName.name).toString().split(' ')[0])
|
||||||
"phone_number": box.read(BoxName.phone) ?? box.read(BoxName.phoneDriver),
|
.toString(),
|
||||||
|
"last_name": encryptionHelper
|
||||||
|
.decryptData(box.read(BoxName.name).toString().split(' ')[1])
|
||||||
|
.toString(),
|
||||||
|
"phone_number": encryptionHelper.decryptData(box.read(BoxName.phone)),
|
||||||
"apartment": apartment ?? "NA",
|
"apartment": apartment ?? "NA",
|
||||||
"floor": floor ?? "NA",
|
"floor": floor ?? "NA",
|
||||||
"building": building ?? "NA",
|
"building": building ?? "NA",
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import 'package:flutter/material.dart';
|
|||||||
import 'package:webview_flutter/webview_flutter.dart';
|
import 'package:webview_flutter/webview_flutter.dart';
|
||||||
|
|
||||||
import '../../../print.dart';
|
import '../../../print.dart';
|
||||||
|
import '../../functions/encrypt_decrypt.dart';
|
||||||
|
|
||||||
class PaymobResponseWallet {
|
class PaymobResponseWallet {
|
||||||
final bool success;
|
final bool success;
|
||||||
@@ -267,9 +268,14 @@ class PaymobBillingDataWallet {
|
|||||||
Map<String, dynamic> toJson() {
|
Map<String, dynamic> toJson() {
|
||||||
return {
|
return {
|
||||||
"email": box.read(BoxName.email) ?? box.read(BoxName.emailDriver),
|
"email": box.read(BoxName.email) ?? box.read(BoxName.emailDriver),
|
||||||
"first_name": box.read(BoxName.name) ?? box.read(BoxName.nameDriver),
|
"first_name": encryptionHelper
|
||||||
"last_name": box.read(BoxName.name) ?? box.read(BoxName.nameDriver),
|
.decryptData(box.read(BoxName.name).toString().split(' ')[0])
|
||||||
"phone_number": box.read(BoxName.phoneWallet),
|
.toString(),
|
||||||
|
"last_name": encryptionHelper
|
||||||
|
.decryptData(box.read(BoxName.name).toString().split(' ')[1])
|
||||||
|
.toString(),
|
||||||
|
"phone_number":
|
||||||
|
encryptionHelper.decryptData(box.read(BoxName.phoneWallet)),
|
||||||
"apartment": apartment ?? "NA",
|
"apartment": apartment ?? "NA",
|
||||||
"floor": floor ?? "NA",
|
"floor": floor ?? "NA",
|
||||||
"building": building ?? "NA",
|
"building": building ?? "NA",
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
import 'dart:convert';
|
import 'dart:convert';
|
||||||
|
|
||||||
import 'package:SEFER/constant/colors.dart';
|
import 'package:SEFER/constant/colors.dart';
|
||||||
|
import 'package:SEFER/controller/functions/encrypt_decrypt.dart';
|
||||||
import 'package:flutter/cupertino.dart';
|
import 'package:flutter/cupertino.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
@@ -73,10 +74,11 @@ class ProfileController extends GetxController {
|
|||||||
Get.back();
|
Get.back();
|
||||||
await updateColumn({
|
await updateColumn({
|
||||||
'id': box.read(BoxName.passengerID),
|
'id': box.read(BoxName.passengerID),
|
||||||
columnName: txtController.text,
|
columnName: encryptionHelper.encryptData(txtController.text),
|
||||||
});
|
});
|
||||||
if (columnName == 'first_name') {
|
if (columnName == 'first_name') {
|
||||||
box.write(BoxName.name, txtController.text);
|
box.write(BoxName.name,
|
||||||
|
encryptionHelper.encryptData(txtController.text));
|
||||||
}
|
}
|
||||||
|
|
||||||
txtController.clear();
|
txtController.clear();
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
import 'dart:io';
|
import 'dart:io';
|
||||||
|
|
||||||
|
import 'package:SEFER/controller/functions/encrypt_decrypt.dart';
|
||||||
import 'package:firebase_auth/firebase_auth.dart';
|
import 'package:firebase_auth/firebase_auth.dart';
|
||||||
import 'package:flutter/gestures.dart';
|
import 'package:flutter/gestures.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
@@ -90,7 +91,8 @@ class LoginPage extends StatelessWidget {
|
|||||||
User? user = await authController.signInWithApple();
|
User? user = await authController.signInWithApple();
|
||||||
if (user != null) {
|
if (user != null) {
|
||||||
box.write(BoxName.passengerID, user.uid);
|
box.write(BoxName.passengerID, user.uid);
|
||||||
box.write(BoxName.email, user.email);
|
box.write(BoxName.email,
|
||||||
|
encryptionHelper.encryptData(user.email.toString()));
|
||||||
await controller.loginUsingCredentials(
|
await controller.loginUsingCredentials(
|
||||||
box.read(BoxName.passengerID).toString(),
|
box.read(BoxName.passengerID).toString(),
|
||||||
box.read(BoxName.email).toString(),
|
box.read(BoxName.email).toString(),
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ import 'package:google_maps_flutter/google_maps_flutter.dart';
|
|||||||
import '../../../constant/box_name.dart';
|
import '../../../constant/box_name.dart';
|
||||||
import '../../../constant/colors.dart';
|
import '../../../constant/colors.dart';
|
||||||
import '../../../constant/table_names.dart';
|
import '../../../constant/table_names.dart';
|
||||||
|
import '../../../controller/functions/encrypt_decrypt.dart';
|
||||||
import '../../../controller/functions/tts.dart';
|
import '../../../controller/functions/tts.dart';
|
||||||
import '../../../controller/home/map_passenger_controller.dart';
|
import '../../../controller/home/map_passenger_controller.dart';
|
||||||
import '../../../controller/home/vip_waitting_page.dart';
|
import '../../../controller/home/vip_waitting_page.dart';
|
||||||
@@ -15,13 +16,10 @@ GetBuilder<MapPassengerController> leftMainMenuIcons() {
|
|||||||
return GetBuilder<MapPassengerController>(
|
return GetBuilder<MapPassengerController>(
|
||||||
builder: (controller) => Positioned(
|
builder: (controller) => Positioned(
|
||||||
top: Get.height * .008,
|
top: Get.height * .008,
|
||||||
left: box.read(BoxName.lang) != 'ar' ? Get.width * .2 : null,
|
left: Get.width * .16,
|
||||||
right: box.read(BoxName.lang) != 'ar'
|
right: Get.width * .16, // Adjust left position for better spacing
|
||||||
? Get.width * .2
|
|
||||||
: null, // Adjust left position for better spacing
|
|
||||||
child: Row(
|
child: Row(
|
||||||
mainAxisAlignment:
|
mainAxisAlignment: MainAxisAlignment.center, // Distribute space evenly
|
||||||
MainAxisAlignment.spaceAround, // Distribute space evenly
|
|
||||||
children: [
|
children: [
|
||||||
_buildIconButtonWithAnimation(
|
_buildIconButtonWithAnimation(
|
||||||
controller: controller,
|
controller: controller,
|
||||||
@@ -62,11 +60,21 @@ GetBuilder<MapPassengerController> leftMainMenuIcons() {
|
|||||||
// const SizedBox(width: 8),
|
// const SizedBox(width: 8),
|
||||||
// _buildIconButtonWithAnimation(
|
// _buildIconButtonWithAnimation(
|
||||||
// controller: controller,
|
// controller: controller,
|
||||||
// icon: Octicons.telescope,
|
// icon: Octicons.screen_full,
|
||||||
// onPressed: () async {
|
// onPressed: () async {
|
||||||
// final result = await sql.getCustomQuery('''
|
// final plainText = 'Hello, Safar App!';
|
||||||
// SELECT * FROM ${TableName.recentLocations} ORDER BY createdAt DESC
|
// debugPrint('Plain Text: $plainText');
|
||||||
// ''');
|
|
||||||
|
// // Encrypt the data
|
||||||
|
// final encryptedData = encryptionHelper.encryptData(plainText);
|
||||||
|
// debugPrint('Encrypted: $encryptedData');
|
||||||
|
|
||||||
|
// // Decrypt the data
|
||||||
|
// final decryptedData = encryptionHelper
|
||||||
|
// .decryptData(encryptedData); // Use the encryptedData variable
|
||||||
|
// debugPrint('Decrypted: $decryptedData');
|
||||||
|
// //kVb4a+11Scs9jQWwzeVfx0PxSDiPWDCuMI/RWYxafMU=
|
||||||
|
// //kVb4a+11Scs9jQWwzeVfx0PxSDiPWDCuMI/RWYxafMU=
|
||||||
// },
|
// },
|
||||||
// tooltip: 'Recent Locations', // More descriptive tooltip
|
// tooltip: 'Recent Locations', // More descriptive tooltip
|
||||||
// ),
|
// ),
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
import 'package:SEFER/controller/functions/encrypt_decrypt.dart';
|
||||||
import 'package:SEFER/views/widgets/my_textField.dart';
|
import 'package:SEFER/views/widgets/my_textField.dart';
|
||||||
import 'package:flutter/cupertino.dart';
|
import 'package:flutter/cupertino.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
@@ -457,7 +458,8 @@ class MainBottomMenuMap extends StatelessWidget {
|
|||||||
Column(
|
Column(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
Text('${'Where to'.tr} ${box.read(BoxName.name)}',
|
Text(
|
||||||
|
'${'Where to'.tr} ${encryptionHelper.decryptData(box.read(BoxName.name).toString().split(' ')[0]).toString()} ${encryptionHelper.decryptData(box.read(BoxName.name).toString().split(' ')[1]).toString()}',
|
||||||
style: AppStyle.subtitle),
|
style: AppStyle.subtitle),
|
||||||
// if (controller.noCarString)
|
// if (controller.noCarString)
|
||||||
// Text('Nearest Car: ~'.tr,
|
// Text('Nearest Car: ~'.tr,
|
||||||
|
|||||||
@@ -5,6 +5,8 @@ import 'package:SEFER/main.dart';
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
|
|
||||||
|
import '../../../controller/functions/encrypt_decrypt.dart';
|
||||||
|
|
||||||
class NewMainBottomSheet extends StatelessWidget {
|
class NewMainBottomSheet extends StatelessWidget {
|
||||||
const NewMainBottomSheet({super.key});
|
const NewMainBottomSheet({super.key});
|
||||||
|
|
||||||
@@ -70,7 +72,7 @@ class NewMainBottomSheet extends StatelessWidget {
|
|||||||
children: [
|
children: [
|
||||||
const Icon(Icons.search),
|
const Icon(Icons.search),
|
||||||
Text(
|
Text(
|
||||||
"${"Where you want go ".tr}${box.read(BoxName.name)} ?",
|
"${"Where you want go ".tr}${encryptionHelper.decryptData(box.read(BoxName.name).toString().split(' ')[0]).toString()} ?",
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ import '../../../constant/box_name.dart';
|
|||||||
import '../../../constant/colors.dart';
|
import '../../../constant/colors.dart';
|
||||||
import '../../../constant/info.dart';
|
import '../../../constant/info.dart';
|
||||||
import '../../../constant/style.dart';
|
import '../../../constant/style.dart';
|
||||||
|
import '../../../controller/functions/encrypt_decrypt.dart';
|
||||||
import '../../../controller/functions/toast.dart';
|
import '../../../controller/functions/toast.dart';
|
||||||
import '../../../controller/home/payment/credit_card_controller.dart';
|
import '../../../controller/home/payment/credit_card_controller.dart';
|
||||||
import '../../../controller/payment/payment_controller.dart';
|
import '../../../controller/payment/payment_controller.dart';
|
||||||
@@ -221,7 +222,10 @@ class CardSeferWallet extends StatelessWidget {
|
|||||||
Align(
|
Align(
|
||||||
alignment: Alignment.bottomRight,
|
alignment: Alignment.bottomRight,
|
||||||
child: Text(
|
child: Text(
|
||||||
box.read(BoxName.name),
|
encryptionHelper
|
||||||
|
.decryptData(
|
||||||
|
box.read(BoxName.name).toString().split(' ')[0])
|
||||||
|
.toString(),
|
||||||
style: AppStyle.title.copyWith(
|
style: AppStyle.title.copyWith(
|
||||||
color: CupertinoColors.secondaryLabel,
|
color: CupertinoColors.secondaryLabel,
|
||||||
fontSize: 16,
|
fontSize: 16,
|
||||||
|
|||||||
@@ -125,7 +125,7 @@ class ComplaintPage extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
const SizedBox(height: 24),
|
const SizedBox(height: 24),
|
||||||
CupertinoFormSection(
|
CupertinoFormSection(
|
||||||
header: Text('SEFER answer'.tr),
|
header: Text('SWIFTI answer'.tr),
|
||||||
children: [
|
children: [
|
||||||
SizedBox(
|
SizedBox(
|
||||||
height: 100,
|
height: 100,
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
import 'package:SEFER/controller/functions/encrypt_decrypt.dart';
|
||||||
import 'package:SEFER/views/auth/login_page.dart';
|
import 'package:SEFER/views/auth/login_page.dart';
|
||||||
import 'package:flutter/cupertino.dart';
|
import 'package:flutter/cupertino.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
@@ -53,7 +54,7 @@ class PassengerProfilePage extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
trailing: const Icon(Icons.arrow_forward_ios),
|
trailing: const Icon(Icons.arrow_forward_ios),
|
||||||
subtitle: Text(
|
subtitle: Text(
|
||||||
'${controller.prfoileData['first_name']} ${controller.prfoileData['last_name']}'),
|
'${encryptionHelper.decryptData(controller.prfoileData['first_name'])} ${encryptionHelper.decryptData(controller.prfoileData['last_name'])}'),
|
||||||
onTap: () {
|
onTap: () {
|
||||||
controller.updatField(
|
controller.updatField(
|
||||||
'first_name', TextInputType.name);
|
'first_name', TextInputType.name);
|
||||||
@@ -69,8 +70,8 @@ class PassengerProfilePage extends StatelessWidget {
|
|||||||
width: 35,
|
width: 35,
|
||||||
),
|
),
|
||||||
trailing: const Icon(Icons.arrow_forward_ios),
|
trailing: const Icon(Icons.arrow_forward_ios),
|
||||||
subtitle: Text(
|
subtitle: Text(encryptionHelper.decryptData(
|
||||||
controller.prfoileData['gender'].toString()),
|
controller.prfoileData['gender'].toString())),
|
||||||
onTap: () {
|
onTap: () {
|
||||||
Get.defaultDialog(
|
Get.defaultDialog(
|
||||||
title: 'Update Gender'.tr,
|
title: 'Update Gender'.tr,
|
||||||
@@ -83,7 +84,9 @@ class PassengerProfilePage extends StatelessWidget {
|
|||||||
controller.updateColumn({
|
controller.updateColumn({
|
||||||
'id': controller.prfoileData['id']
|
'id': controller.prfoileData['id']
|
||||||
.toString(),
|
.toString(),
|
||||||
'gender': controller.gender,
|
'gender':
|
||||||
|
encryptionHelper.encryptData(
|
||||||
|
controller.gender),
|
||||||
});
|
});
|
||||||
Get.back();
|
Get.back();
|
||||||
},
|
},
|
||||||
@@ -178,7 +181,9 @@ class PassengerProfilePage extends StatelessWidget {
|
|||||||
size: 35,
|
size: 35,
|
||||||
),
|
),
|
||||||
trailing: const Icon(Icons.arrow_forward_ios),
|
trailing: const Icon(Icons.arrow_forward_ios),
|
||||||
subtitle: Text(controller.prfoileData['sosPhone']
|
subtitle: Text(encryptionHelper
|
||||||
|
.decryptData(
|
||||||
|
controller.prfoileData['sosPhone'])
|
||||||
.toString()),
|
.toString()),
|
||||||
onTap: () async {
|
onTap: () async {
|
||||||
await controller.updatField(
|
await controller.updatField(
|
||||||
|
|||||||