This commit is contained in:
Hamza-Ayed
2024-06-27 17:41:40 +03:00
parent ce2dfa2ff4
commit 929ecf39f9
26 changed files with 461 additions and 274 deletions

13
.env
View File

@@ -1,4 +1,6 @@
basicAuthCredentials=wqnmqqsjyvwv:nqrYJP@1737XrXlBl
basicCompareFaces=zjujluqfj:nqrYjp@1737XrXlBl
basicCompareFacesURL='https://face-detect-f6924392c4c7.herokuapp.com/compare_faces'
accountSIDTwillo=QFx0qy456juj3839xuy2194q629q1fj0y7XrXlBl
serverAPI=QQQQobSrrFi:QVQ87xU7zwCvmZzZdaxuS2f23Y4mz7MzyOzr8od2br6KYyeFaTVLG3K3hx5ZaUyx7eYvAYpAVdKk-286NTRi3zs9iSOnXtXRIxswg3KecBmsl3VxJ9wO-vIpwu4Pv7dkHkXniuxMSDgWXrXlBl
mapAPIKEY=QOmqZsFsutLDCtZCRIUAZAkB5v6AMkKEPMbJGa3XrXlBl
@@ -12,7 +14,7 @@ chatGPTkeySeferNew=zg-Z4AJcAROgNXjgrEIU8fKC9XrxgUE4Qtrrlq1yiux0jL3dITSXrXlBl
secretKey=zg_ropj_57Iiv6MFCBFq3C2n6IXlmjykpxDmW93SW3vvXh68UA9T5FORTWgWsT37StKsOPdwDdsy8qR9srMUluahs3nPHvgBa33tGk90vV5XrXlBl
stripe_publishableKe=vg_ropj_57Iiv6MFCBFq3C2n6kNJnZByV6nuDtXe9IjEPOfhmpDtWmt3MLR0gQpiHcQmAFMUPrZc3QiCDjxBZLbxDC3efxWxz33bWH1ZgrsXrXlBl
llamaKey=RR-EuyoFDUvfRDBj46fZKAtKJ3voM8Mt768cPeJV7GNdAkPTKdY8Odm9n4ggGqI5GyoXrXlBl
serverPHP=https://api.sefer.live/sefer/
serverPHP=https://api.sefer.live/sefer
cohere=Aulwd8y5SPWos0hJhG0toUf8gOhUUrpf5Q2TPmVGXrXlBl
claudeAiAPI=zg-qbc-qvo39-xWOxIGwWTOzCFBnIYSKKhfyz_KVAvrH-6_4ZEJL68G_QBH26oeTOMMoQug9KuOjjKSP_A4S3SUDlbxR9duVzoQ-MkX_UQQQXrXlBl
payPalClientId=QALymfNI5Tzt4s-ysoz6vD4_nqX0SUtkC_qYV-Ugk5gaM_8Z-kg4L53k8Uux_4jEWXDkNpXGSWPpIzDFXrXlBl
@@ -25,10 +27,15 @@ agoraAppId=71880f2j636509j24y5294480y30u848XrXlBl
agoraAppCertificate=j17q944u49390q758u1649448q2y6xfuXrXlBl
usernamePayMob=37319104052XrXlBl
passwordPayMob='g@nkD2#99!hD_.wXrXlBl'
integrationIdPayMob=0552355XrXlBl
integrationIdPayMob=0237730XrXlBl
payMobApikey='MDrGqKEWS1rVqHvEPDvPjJ7vZDBExrO7S3BEBgrlfUwTA3i5RnP5ZnvoL3M2S9rEBgrlNTdexH5pTPf7NJrvy1reZJv1Tn7zf7vTIDywjHg1C7Ley38HTDyNA3v7TPfdxJrax1rwPmPtMJyzqKEYZeghq3MuLUrFH3A1AgHcH15CZ9UaZTLOxnw0BTdzHHrBArisZerUMUUzZ1BnBeEijHvNjYLnS1BUICMhSmPhA15ifHyVqKEMHWyKLbyuIPvcH9UeL3vZyDf=XrXlBl'
integrationIdPayMobWallet=0552352XrXlBl
integrationIdPayMobWallet=0237739XrXlBl
ocpApimSubscriptionKey=17373j50x53u07q0830634f512j731yuXrXlBl
smsPasswordEgypt="J)Vh=qb/@MXrXlBl"
chatGPTkeySeferNew4=zg-vlie-2l1ZlpxiLJ6wQOvbb4TnC9XrxgUEyVQIu6TID4qP4FUUqoS5XrXlBl
anthropicAIkeySeferNew=zg-qbc-qvo39-n4VdMQ5nuJeIYhMN4PDYr7qox3-t2i1Lh7aNTDfYF-Gf8whUJZCs47EeelKn8_UcmUMmiSLaf0UJg0DvUlQrDt-76CRrkQQXrXlBl
llama3Key=kzg_uTXy3e9DBbCQ1FnMGxYwTKysx9US1burxJj4fFwOje4LZBUFKJS1XrXlBl
payMobOutClientSecrret='wcP2bUQBRYy254hjCJhNlOatefDzifNDnXRQSiu6UhhcXfZdyCyiBaUr9JQpI2mlIkKVRyoNliuBv1P8QZPLveiZrUeYBLmS6wuVhbQEJku1B5MHhgbB0AboqaOMpqBcXrXlBl'
payMobOutClient_id='gnBTH5kGzR4RGPwzEUxIKCJx9SA5zAwpXiX4vaiTXrXlBl'
payMobOutPassword='#f9vZtxHdIGvAbl5wWMQkvgZTXrXlBl'
payMobOutUserName='zjujl_qvo_fwjfgjlXrXlBl'

View File

@@ -55,8 +55,8 @@ android {
// For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration.
minSdkVersion 23
targetSdkVersion flutter.targetSdkVersion
versionCode 37
versionName '1.5.37'
versionCode 40
versionName '1.5.40'
// manifestPlaceholders = [mapsApiKey: 'android/app/src/main/AndroidManifest.xml']
}

View File

@@ -1,3 +1,3 @@
org.gradle.jvmargs=-Xmx1536M
org.gradle.jvmargs=-Xmx4096M
android.useAndroidX=true
android.enableJetifier=true

View File

@@ -41,7 +41,7 @@
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>36</string>
<string>4.3.6</string>
<key>FirebaseAppDelegateProxyEnabled</key>
<string>NO</string>
<key>GMSApiKey</key>

View File

@@ -4,5 +4,9 @@
<dict>
<key>aps-environment</key>
<string>development</string>
<key>com.apple.developer.applesignin</key>
<array>
<string>Default</string>
</array>
</dict>
</plist>

View File

@@ -10,28 +10,29 @@ class AppStyle {
fontSize: 40,
color: AppColor.accentColor,
fontFamily: box.read(BoxName.lang) == 'ar'
? 'mohanad'
// ?GoogleFonts.notoNaskhArabic().fontFamily
? GoogleFonts.notoNaskhArabic().fontFamily
: GoogleFonts.roboto().fontFamily);
static TextStyle headTitle2 = TextStyle(
fontWeight: FontWeight.bold,
fontSize: 26,
color: AppColor.writeColor,
fontFamily: box.read(BoxName.lang) == 'ar'
? 'mohanad'
? GoogleFonts.notoNaskhArabic().fontFamily
: GoogleFonts.roboto().fontFamily);
static TextStyle title = TextStyle(
fontWeight: FontWeight.normal,
fontSize: box.read(BoxName.lang) == 'ar' ? 14 : 16,
color: AppColor.writeColor,
fontFamily: box.read(BoxName.lang) == 'ar'
? 'mohanad'
? GoogleFonts.notoNaskhArabic().fontFamily
: GoogleFonts.roboto().fontFamily);
static TextStyle subtitle = TextStyle(
fontWeight: FontWeight.bold,
fontSize: 13,
color: AppColor.writeColor,
fontFamily: box.read(BoxName.lang) == 'ar'
? 'mohanad'
? GoogleFonts.notoNaskhArabic().fontFamily
: GoogleFonts.roboto().fontFamily);
static TextStyle number = const TextStyle(
fontWeight: FontWeight.bold,
@@ -53,9 +54,13 @@ class AppStyle {
static BoxDecoration boxDecoration1 = const BoxDecoration(
boxShadow: [
BoxShadow(
color: AppColor.accentColor, blurRadius: 5, offset: Offset(2, 4)),
color: Color.fromARGB(255, 237, 230, 230),
blurRadius: 5,
offset: Offset(2, 4)),
BoxShadow(
color: AppColor.accentColor, blurRadius: 5, offset: Offset(-2, -2))
color: Color.fromARGB(255, 242, 237, 237),
blurRadius: 5,
offset: Offset(-2, -2))
],
color: AppColor.secondaryColor,
borderRadius: BorderRadius.all(

View File

@@ -7,28 +7,40 @@ class AuthController extends GetxController {
Future<User?> signInWithApple() async {
try {
print('Starting Apple Sign In process');
final appleCredential = await SignInWithApple.getAppleIDCredential(
scopes: [
AppleIDAuthorizationScopes.email,
AppleIDAuthorizationScopes.fullName,
],
);
print('Apple ID Credential obtained');
final oAuthProvider = OAuthProvider('apple.com');
final credential = oAuthProvider.credential(
idToken: appleCredential.identityToken,
accessToken: appleCredential.authorizationCode,
);
print('OAuth credential created');
UserCredential userCredential =
await _auth.signInWithCredential(credential);
print('User signed in successfully: ${userCredential.user?.uid}');
return userCredential.user;
} catch (error) {
print('Error during Apple Sign In: $error');
return null;
}
}
void signOut() async {
Future<void> signOut() async {
try {
await _auth.signOut();
print('User signed out successfully');
} catch (error) {
print('Error during sign out: $error');
}
}
}

View File

@@ -4,7 +4,6 @@ import 'dart:math';
import 'package:SEFER/controller/firebase/firbase_messge.dart';
import 'package:SEFER/views/auth/sms_verfy_page.dart';
import 'package:flutter/material.dart';
import 'package:flutter_secure_storage/flutter_secure_storage.dart';
import 'package:get/get.dart';
import 'package:SEFER/constant/box_name.dart';
import 'package:SEFER/constant/links.dart';
@@ -25,7 +24,6 @@ class LoginController extends GetxController {
TextEditingController adminNameController = TextEditingController();
bool isAgreeTerms = false;
bool isloading = false;
final FlutterSecureStorage _storage = const FlutterSecureStorage();
void changeAgreeTerm() {
isAgreeTerms = !isAgreeTerms;
@@ -74,8 +72,8 @@ class LoginController extends GetxController {
box.read(BoxName.tokenFCM)) {
Get.put(FirebaseMessagesController())
.sendNotificationToAnyWithoutData(
'token change',
'change device',
'token change'.tr,
'change device'.tr,
jsonDecode(token)['data'][0]['token'].toString(),
);
Future.delayed(const Duration(seconds: 1));
@@ -83,10 +81,20 @@ class LoginController extends GetxController {
'token': box.read(BoxName.tokenFCM),
'passengerID': box.read(BoxName.passengerID).toString()
});
Get.defaultDialog(
title: 'Device Change Detected'.tr,
middleText:
'You can only use one device at a time. This device will now be set as your active device.'
.tr,
textConfirm: 'OK'.tr,
confirmTextColor: Colors.white,
onConfirm: () {
Get.back();
Get.offAll(() => const MapPagePassenger());
},
);
}
}
Get.offAll(() => const MapPagePassenger());
} else {
Get.offAll(() => SmsSignupEgypt());

View File

@@ -1,3 +1,4 @@
import 'dart:async';
import 'dart:convert';
import 'dart:math';
@@ -27,10 +28,10 @@ class RegisterController extends GetxController {
TextEditingController siteController = TextEditingController();
TextEditingController verfyCode = TextEditingController();
TextEditingController verifyCode = TextEditingController();
int remainingTime = 300; // 5 minutes in seconds
bool isSent = false;
bool isLoading = false;
Timer? _timer;
String birthDate = 'Birth Date'.tr;
String gender = 'Male'.tr;
@override
@@ -38,6 +39,17 @@ class RegisterController extends GetxController {
super.onInit();
}
void startTimer() {
_timer?.cancel(); // Cancel any existing timer
_timer = Timer.periodic(const Duration(seconds: 1), (timer) {
if (remainingTime > 0) {
remainingTime--;
} else {
timer.cancel();
}
});
}
getBirthDate() {
Get.defaultDialog(
title: 'Select Date'.tr,
@@ -84,6 +96,8 @@ class RegisterController extends GetxController {
await smsEgyptController.sendSmsEgypt(
phoneController.text.toString(), randomNumber.toString());
isSent = true;
remainingTime = 300; // Reset to 5 minutes
startTimer();
isLoading = false;
update();
}
@@ -159,4 +173,10 @@ class RegisterController extends GetxController {
}
}
}
@override
void onClose() {
_timer?.cancel();
super.onClose();
}
}

View File

@@ -0,0 +1,15 @@
import 'package:get/get.dart';
import '../../constant/box_name.dart';
import '../../main.dart';
class HomePageController extends GetxController {
late bool isVibrate = true;
void changeVibrateOption(bool value) {
isVibrate = box.read(BoxName.isvibrate) ?? true;
isVibrate = value;
box.write(BoxName.isvibrate, value);
update();
}
}

View File

@@ -110,6 +110,7 @@ class MapPassengerController extends GetxController {
bool isDriverInPassengerWay = false;
bool isDriverArrivePassenger = false;
bool startLocationFromMap = false;
bool isAnotherOreder = false;
bool passengerStartLocationFromMap = false;
bool workLocationFromMap = false;
bool homeLocationFromMap = false;
@@ -466,6 +467,11 @@ class MapPassengerController extends GetxController {
update();
}
void changeisAnotherOreder(bool val) {
isAnotherOreder = val;
update();
}
void sendSMS(String to) async {
// Get the driver's phone number.
String driverPhone =
@@ -502,7 +508,7 @@ class MapPassengerController extends GetxController {
void getDrawerMenu() {
heightMenuBool = !heightMenuBool;
widthMapTypeAndTraffic = heightMenuBool == true ? 0 : 50;
heightMenu = heightMenuBool == true ? 100 : 0;
heightMenu = heightMenuBool == true ? 70 : 0;
widthMenu = heightMenuBool == true ? 110 : 0;
update();
}

View File

@@ -4,6 +4,25 @@ class MyTranslation extends Translations {
@override
Map<String, Map<String, String>> get keys => {
"ar": {
"Pick from map destination": "حدد وجهتك على الخريطة",
"Pick or Tap to confirm": "حدد أو انقر للتأكيد",
"Select Order Type": "حدد نوع الطلب",
"Choose who this order is for": "اختر لمن هذا الطلب",
"I want to order for myself": "أريد أن أطلب لنفسي",
"I want to order for someone else": "أريد أن أطلب لشخص آخر",
"If you want order to another person": "إذا كنت تريد الطلب لشخص آخر",
"Wehaven'tfoundanydriversyet.Considerincreasingyourtripfeetomakeyouroffermoreattractivetodrivers.":
"لم نجد أي سائقين بعد. ضع في اعتبارك زيادة رسوم رحلتك لجعل عرضك أكثر جاذبية للسائقين.",
"IncreaseYourTripFee(Optional)": "زيادة رسوم رحلتك (اختياري)",
'Vibration': "اهتزاز‏",
'Resend code': "إعادة إرسال الرمز",
"Sign in with Apple": "تسجيل الدخول باستخدام Apple",
"token change": "تغيير الرمز",
"change device": "تغيير الجهاز",
"Device Change Detected": "تم اكتشاف تغيير الجهاز",
"You can only use one device at a time. This device will now be set as your active device.":
"يمكنك استخدام جهاز واحد في المرة الواحدة. سيتم الآن تعيين هذا الجهاز كجهازك النشط.",
"Click here point": "انقر هنا", // Click here (literal translation)
"Pick or Tap to confirm":
"اختر أو اضغط للتأكيد", // Choose or Tap to confirm
@@ -196,42 +215,39 @@ iOS [https://getapp.cc/app/6458734951]
'Get to your destination quickly and easily.':
'وصول إلى وجهتك بسرعة وسهولة.',
'Enjoy a safe and comfortable ride.': 'استمتع برحلة آمنة ومريحة.',
"Choose Language": "اخْتَر اللُّغَة",
"Login": "تَسْجِيل الدُّخُول",
"Pay with Wallet": 'ادْفَع بِاسْتِخْدَام المَحْفَظَة',
"Invalid MPIN": 'رَمْز PIN غَيْر صَحِيح',
"Invalid OTP": 'كود التَّحَقُّق خَاطِئ',
"Enter your email address":
"أدْخِل عُنْوَان بَرِيدِكَ الإلِكْتْرُونِي",
"Please enter Your Email.":
"يَرْجَى إِدْخَال بَرِيدِكَ الإلِكْتْرُونِي.",
"Enter your phone number": "أدْخِل رَقْم هَاتِفِكَ",
"Please enter your phone number.":
"يَرْجَى إِدْخَال رَقْم هَاتِفِكَ.",
"Please enter Your Password.": "يَرْجَى إِدْخَال كَلِمَة المُرُور.",
"Submit": "إرْسَال",
"if you dont have account": "إِذَا لَمْ يَكُن لَدَيْكَ حِسَاب",
"Register": "تَسْجِيل",
"Choose Language": "اختر اللغة",
"Login": "تسجيل الدخول",
"Pay with Wallet": "ادفع باستخدام المحفظة",
"Invalid MPIN": "رمز PIN غير صحيح",
"Invalid OTP": "كود التحقق خاطئ",
"Enter your email address": "أدخل عنوان بريدك الإلكتروني",
"Please enter Your Email.": "يرجى إدخال بريدك الإلكتروني.",
"Enter your phone number": "أدخل رقم هاتفك",
"Please enter your phone number.": "يرجى إدخال رقم هاتفك.",
"Please enter Your Password.": "يرجى إدخال كلمة المرور.",
"Submit": "إرسال",
"if you dont have account": "إذا لم يكن لديك حساب",
"Register": "تسجيل",
"Accept Ride's Terms & Review Privacy Notice":
"قَبُول شُرُوط الاسْتِخْدَام وَمُرَاجَعَة إِشْعَار الخُصُوصِيَّة",
"قبول شروط الاستخدام ومراجعة إشعار الخصوصية",
"By selecting 'I Agree' below, I have reviewed and agree to the Terms of Use and acknowledge the Privacy Notice. I am at least 18 years of age.":
"مِنْ خِلَال اخْتِيَار 'أُوَافِق' أَدْنَاهُ، قُمْتُ بِمُرَاجَعَة وَقَبُول شُرُوط الاسْتِخْدَام وَأُقِرُّ بِإِشْعَار الخُصُوصِيَّة. أَنَا عَلَى الأَقَل 18 عَامًا.",
"I Agree": "أُوَافِق",
"First name": "الاسْم الأَوَّل",
"Enter your first name": "أدْخِل اسْمَكَ الأَوَّل",
"Please enter your first name.": "يَرْجَى إِدْخَال اسْمِكَ الأَوَّل.",
"Last name": "اسْم العَائِلَة",
"Enter your last name": "أدْخِل اسْمَكَ الأَخِير",
"Please enter your last name.": "يَرْجَى إِدْخَال اسْمِكَ الأَخِير.",
"City": "المَدِينَة",
"Please enter your City.": "يَرْجَى إِدْخَال اسْم مَدِينَتِكَ.",
"Male": "ذَكَر",
"Female": "أُنْثَى",
"Verify Email": "تَحَقَّق مِنْ البَرِيد الإلِكْتْرُونِي",
"من خلال اختيار 'أوافق' أدناه، قمت بمراجعة وقبول شروط الاستخدام وأقر بإشعار الخصوصية. أنا على الأقل 18 عامًا.",
"I Agree": "أوافق",
"First name": "الاسم الأول",
"Enter your first name": "أدخل اسمك الأول",
"Please enter your first name.": "يرجى إدخال اسمك الأول.",
"Last name": "اسم العائلة",
"Enter your last name": "أدخل اسمك الأخير",
"Please enter your last name.": "يرجى إدخال اسمك الأخير.",
"City": "المدينة",
"Please enter your City.": "يرجى إدخال اسم مدينتك.",
"Male": "ذكر",
"Female": "أنثى",
"Verify Email": "تحقق من البريد الإلكتروني",
"We sent 5 digit to your Email provided":
"لَقَدْ أَرْسَلْنَا رَمْزًا مُؤَلَّفًا مِنْ 5 أَرْقَام إِلَى بَرِيدِكَ الإلِكْتْرُونِي المُدْخَل",
"5 digit": "5 أَرْقَام",
"Send Verification Code": "إرْسَال رَمْز التَّحَقُّق",
"لقد أرسلنا رمزًا مؤلفًا من 5 أرقام إلى بريدك الإلكتروني المدخل",
"5 digit": "5 أرقام",
"Send Verification Code": "إرسال رمز التحقق",
"Your Ride Duration is ": "مُدَّة رِحْلَتِكَ ",
"You will be thier in": "سَتَكُون هُنَاكَ فِي",
"You trip distance is": "مَسَافَة الرِّحْلَة",
@@ -664,12 +680,12 @@ iOS [https://getapp.cc/app/6458734951]
"Yes": 'نَعَمْ',
"Insert Emergincy Number": "أَدْخِلِ رَقْمَ الطَّوَارِئِ",
"Best choice for comfort car and flexible route and stops point":
'أَفْضَلُ خِيَارٍ لِسَيَّارَةِ رَاحَةٍ وَمَسَارٍ مُرِنٍ وَنِقَاطِ تَوَقُّفٍ',
"رحلة مكيفة ومسار متغير لرغبة العميل ونقاط توقف",
"Insert": "إِدْرَاجُ",
"This is for delivery or a motorcycle.":
"هَذَا لِلتَّسْلِيمِ أَوِ الدَّرَّاجَةِ النَّارِيَّةِ",
"This trip goes directly from your starting point to your destination for a fixed price. The driver must follow the planned route":
'الرِّحْلَةُ دِي مِنْ نُقْطَةِ الْبِدَايَةِ لِنُقْطَةِ النِّهَايَةِ بِسِعْرٍ ثَابِتٍ وَالسَّوَّاقُ لَازِمٌ يَمْشِي بِنَفْسِ الطَّرِيقِ.',
'‏رحلة محددة السعر والشريك السائق ملتزم بالمسار المحدد من خلال التطبيق',
"You can decline a request without any cost":
"‏يمكنك إلغاء الطلب بدون أي تكلفة",
"Perfect for adventure seekers who want to experience something new and exciting":

View File

@@ -1,8 +1,5 @@
import 'dart:convert';
import 'dart:io';
import 'package:SEFER/views/auth/sms_verfy_page.dart';
import 'package:animated_text_kit/animated_text_kit.dart';
import 'package:firebase_auth/firebase_auth.dart';
import 'package:flutter/gestures.dart';
import 'package:flutter/material.dart';
@@ -16,16 +13,10 @@ import 'package:SEFER/views/widgets/elevated_btn.dart';
import 'package:SEFER/views/widgets/my_scafold.dart';
import '../../constant/info.dart';
import '../../constant/links.dart';
import '../../controller/auth/apple_signin_controller.dart';
import '../../controller/auth/google_sign.dart';
import '../../controller/auth/login_controller.dart';
import '../../controller/firebase/firbase_messge.dart';
import '../../controller/functions/crud.dart';
import '../../controller/functions/toast.dart';
import '../home/profile/passenger_profile_page.dart';
import '../widgets/mycircular.dart';
import 'register_page.dart';
class LoginPage extends StatelessWidget {
final controller = Get.put(LoginController());
@@ -88,53 +79,45 @@ class LoginPage extends StatelessWidget {
kolor: AppColor.blueColor,
),
!Platform.isAndroid
? Row(
mainAxisAlignment: MainAxisAlignment.center,
? GestureDetector(
onTap: () async {
User? user =
await authController.signInWithApple();
if (user != null) {
box.write(BoxName.passengerID, user.uid);
box.write(BoxName.email, user.email);
await GoogleSignInHelper
.signInFromLogin();
// Navigate to another screen or perform other actions
} else {}
},
child: Container(
padding: const EdgeInsets.symmetric(
horizontal: 16, vertical: 10),
decoration: BoxDecoration(
color: Colors.black,
borderRadius: BorderRadius.circular(8),
),
child: Row(
mainAxisSize: MainAxisSize.min,
children: [
const Icon(
Icons.apple,
size: 30,
color: Colors.white,
size: 24,
),
const SizedBox(width: 8),
Text(
'Sign in with Apple'.tr,
style: const TextStyle(
color: Colors.white,
fontSize: 16,
fontWeight: FontWeight.w500,
),
const SizedBox(
width: 8), // Adjust spacing as needed
MyElevatedButton(
title: 'Sign in with Apple'.tr,
onPressed: () async {
try {
User? user = await authController
.signInWithApple();
if (user != null) {
box.write(
BoxName.driverID, user.uid);
box.write(BoxName.emailDriver,
user.email);
// Provide user feedback
await GoogleSignInHelper
.signInFromLogin();
Navigator.of(context)
.pushReplacementNamed('/home');
Toast.show(
context,
'Signed in successfully',
AppColor.greenColor);
} else {
Toast.show(
context,
'Sign in failed. Please try again.',
AppColor.yellowColor);
}
} catch (error) {
print('Sign in error: $error');
Toast.show(
context,
'An error occurred. Please check your connection and try again.',
AppColor.redColor);
}
},
kolor: Colors.black,
),
],
),
),
)
: const SizedBox(),
],

View File

@@ -73,6 +73,40 @@ class SmsSignupEgypt extends StatelessWidget {
const SizedBox(
height: 10,
),
if (registerController.isSent)
Obx(() => Column(
children: [
Padding(
padding: const EdgeInsets.symmetric(horizontal: 16.0),
child: registerController.remainingTime > 0
? Column(
children: [
Text(
'${(registerController.remainingTime / 60).floor()}:${(registerController.remainingTime % 60).toString().padLeft(2, '0')} remaining',
style: AppStyle.subtitle,
textAlign: TextAlign.center,
),
const SizedBox(height: 8),
LinearProgressIndicator(
value: registerController.remainingTime /
300, // Assuming 300 seconds (5 minutes) total
backgroundColor: Colors.grey[300],
valueColor: AlwaysStoppedAnimation<Color>(
Theme.of(context).primaryColor),
),
],
)
: TextButton(
onPressed: () =>
registerController.sendOtpMessage(),
child: Text('Resend code'.tr),
),
),
const SizedBox(
height:
16), // Add some space after the timer or button
],
)),
Padding(
padding: const EdgeInsets.all(16.0),
child: registerController.isSent

View File

@@ -1,4 +1,5 @@
import 'package:SEFER/controller/functions/tts.dart';
import 'package:SEFER/controller/home/home_page_controller.dart';
import 'package:SEFER/views/widgets/elevated_btn.dart';
import 'package:flutter/material.dart';
import 'package:get/get.dart';
@@ -19,6 +20,7 @@ class HomePage extends StatelessWidget {
@override
Widget build(BuildContext context) {
Get.put(HomePageController());
return MyScafolld(
isleading: true,
title: 'Home Page'.tr,
@@ -74,6 +76,25 @@ class HomePage extends StatelessWidget {
),
onTap: () => Get.to(() => const FrequentlyQuestionsPage()),
),
ListTile(
leading: const Icon(Icons.vibration),
title: GetBuilder<HomePageController>(builder: (controller) {
return SwitchListTile(
title: Text(
'Vibration'.tr,
style: AppStyle.headTitle2,
),
value: controller.isVibrate,
onChanged: controller.changeVibrateOption,
activeColor: AppColor.primaryColor,
);
}),
subtitle: Text(
'You can change the Vibration for all butttons'.tr,
style: AppStyle.title,
),
onTap: () => Get.to(() => const FrequentlyQuestionsPage()),
),
ListTile(
leading: const Icon(Icons.record_voice_over_outlined),
title: Text(

View File

@@ -615,10 +615,14 @@ class HeaderDestination extends StatelessWidget {
'🟢 ',
style: AppStyle.subtitle,
),
Text(
SizedBox(
height: Get.height * .06,
width: Get.width * .8,
child: Text(
mapPassengerController.startNameAddress,
style: AppStyle.subtitle,
),
),
],
),
Row(
@@ -629,10 +633,14 @@ class HeaderDestination extends StatelessWidget {
'🔴 ',
style: AppStyle.subtitle,
),
Text(
SizedBox(
height: Get.height * .06,
width: Get.width * .8,
child: Text(
mapPassengerController.endNameAddress,
style: AppStyle.subtitle,
),
),
],
),
],

View File

@@ -71,7 +71,8 @@ GetBuilder<MapPassengerController> formSearchPlacesDestenation() {
height: 10,
),
Container(
decoration: AppStyle.boxDecoration1,
decoration: AppStyle.boxDecoration1
.copyWith(color: AppColor.blueColor),
child: InkWell(
onTap: () {
controller.changeMainBottomMenuMap();
@@ -81,8 +82,11 @@ GetBuilder<MapPassengerController> formSearchPlacesDestenation() {
padding: const EdgeInsets.symmetric(
horizontal: 20, vertical: 4),
child: Text(
'Pick from map'.tr,
style: AppStyle.headTitle2,
controller.isAnotherOreder
? 'Pick from map destination'.tr
: 'Pick from map'.tr,
style: AppStyle.title
.copyWith(color: AppColor.secondaryColor),
),
),
)),
@@ -144,13 +148,14 @@ GetBuilder<MapPassengerController> formSearchPlacesDestenation() {
child: Container(
width: Get.width * .25,
decoration: BoxDecoration(
color: AppColor.greenColor.withOpacity(.4),
color: AppColor.blueColor.withOpacity(.4),
border: Border.all()),
child: Text(
' ${box.read(BoxName.addWork)}' == 'addWork'
? 'Add Work'.tr
: 'Work'.tr,
: 'To Work'.tr,
textAlign: TextAlign.center,
style: AppStyle.title,
),
),
),
@@ -208,11 +213,12 @@ GetBuilder<MapPassengerController> formSearchPlacesDestenation() {
child: Container(
width: Get.width * .25,
decoration: BoxDecoration(
color: AppColor.yellowColor.withOpacity(.4),
color: AppColor.blueColor.withOpacity(.4),
border: Border.all()),
child: Text(
style: AppStyle.title,
textAlign: TextAlign.center,
'${box.read(BoxName.addHome) == 'addHome' ? 'Add Home' : 'Home'} '),
'${box.read(BoxName.addHome) == 'addHome' ? 'Add Home'.tr : "To Home".tr} '),
),
),
],

View File

@@ -1,3 +1,4 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:SEFER/constant/box_name.dart';
@@ -12,6 +13,7 @@ import '../../../constant/colors.dart';
import '../../../constant/table_names.dart';
import '../../../controller/functions/toast.dart';
import '../../../controller/functions/tts.dart';
import 'form_search_start.dart';
class MainBottomMenuMap extends StatelessWidget {
const MainBottomMenuMap({super.key});
@@ -43,9 +45,28 @@ class MainBottomMenuMap extends StatelessWidget {
child: Container(
width: Get.width * .8,
height: Get.height * .1,
decoration: AppStyle.boxDecoration1,
decoration: const BoxDecoration(
boxShadow: [
BoxShadow(
color: Color.fromARGB(
255, 237, 230, 230),
blurRadius: 5,
offset: Offset(2, 4)),
BoxShadow(
color: Color.fromARGB(
255, 242, 237, 237),
blurRadius: 5,
offset: Offset(-2, -2))
],
color: AppColor.blueColor,
borderRadius: BorderRadius.all(
Radius.elliptical(15, 30),
),
),
// decoration: AppStyle.boxDecoration1,
child: DefaultTextStyle(
style: AppStyle.title,
style: AppStyle.title.copyWith(
color: AppColor.secondaryColor),
child: Center(
child: controller.isPickerShown
? clickPointPosition(
@@ -62,6 +83,7 @@ class MainBottomMenuMap extends StatelessWidget {
icon: controller.isMainBottomMenuMap
? const Icon(
Icons.ads_click,
color: AppColor.secondaryColor,
size: 35,
)
: const Icon(
@@ -88,10 +110,9 @@ class MainBottomMenuMap extends StatelessWidget {
? const SizedBox()
: Column(
children: [
// controller.currentLocationToFormPlaces
// ? const SizedBox()
// :
// formSearchPlacesStart(),
!controller.isAnotherOreder
? const SizedBox()
: formSearchPlacesStart(),
formSearchPlacesDestenation(),
const SizedBox(
height: 10,
@@ -117,16 +138,81 @@ class MainBottomMenuMap extends StatelessWidget {
// controller.showBottomSheet1();
// }),
//todo If you want add stop click here
// TextButton(
// onPressed: () {
// controller.changeMainBottomMenuMap();
// controller.changeWayPointSheet();
// },
// child: Text(
// "If you want add stop click here".tr,
// style: AppStyle.title,
// ),
// ),
CupertinoButton(
child: Text(
!controller.isAnotherOreder
? 'I want to order for someone else'
.tr
: 'I want to order for myself'.tr,
),
onPressed: () {
showCupertinoModalPopup(
context: context,
builder: (BuildContext context) =>
CupertinoActionSheet(
title: Text('Select Order Type'.tr),
message: Text(
'Choose who this order is for'
.tr),
actions: <Widget>[
CupertinoActionSheetAction(
child: Row(
mainAxisAlignment:
MainAxisAlignment.center,
children: [
const Icon(
CupertinoIcons.person,
color: CupertinoColors
.activeBlue),
const SizedBox(width: 15),
Text(
'I want to order for myself'
.tr),
],
),
onPressed: () {
controller
.changeisAnotherOreder(
false);
Navigator.pop(context);
},
),
CupertinoActionSheetAction(
child: Row(
mainAxisAlignment:
MainAxisAlignment.center,
children: [
const Icon(
CupertinoIcons.person_2,
color: CupertinoColors
.activeBlue),
const SizedBox(width: 15),
Text(
'I want to order for someone else'
.tr),
],
),
onPressed: () {
controller
.changeisAnotherOreder(
true);
Navigator.pop(context);
},
),
],
cancelButton:
CupertinoActionSheetAction(
isDefaultAction: true,
onPressed: () {
Navigator.pop(context);
},
child: Text('Cancel'.tr),
),
),
);
},
)
],
)
],
@@ -199,6 +285,7 @@ class MainBottomMenuMap extends StatelessWidget {
onPressed: () async {
controller.clearPolyline();
controller.data = [];
//todo add isAnothorOrder
if (controller.passengerStartLocationFromMap == true) {
controller.newMyLocation = controller.newStartPointLocation;
controller.changeMainBottomMenuMap();
@@ -253,8 +340,10 @@ class MainBottomMenuMap extends StatelessWidget {
controller.changeMainBottomMenuMap();
controller.passengerStartLocationFromMap = true;
controller.isPickerShown = true;
await controller.mapController?.animateCamera(CameraUpdate.newLatLng(
LatLng(controller.passengerLocation.latitude,
if (controller.isAnotherOreder == false) {
await controller.mapController?.animateCamera(
CameraUpdate.newLatLng(LatLng(
controller.passengerLocation.latitude,
controller.passengerLocation.longitude)));
Get.defaultDialog(
title: 'Destination selected'.tr,
@@ -268,6 +357,7 @@ class MainBottomMenuMap extends StatelessWidget {
onPressed: () {
Get.back();
}));
} else {}
}
controller.placesDestination = [];
@@ -289,6 +379,7 @@ class MainBottomMenuMap extends StatelessWidget {
? const Icon(
Icons.arrow_circle_up_rounded,
size: 35,
color: AppColor.secondaryColor,
)
: const Icon(
Icons.arrow_circle_down_rounded,
@@ -300,7 +391,10 @@ class MainBottomMenuMap extends StatelessWidget {
? 'Pick or Tap to confirm'.tr
// ? 'Pick your ride location on the map - Tap to confirm'.tr
: "Click here point".tr,
style: AppStyle.title,
style: AppStyle.title.copyWith(
color: AppColor.secondaryColor,
fontWeight: FontWeight.bold,
fontSize: 18),
),
],
),
@@ -318,6 +412,7 @@ class MainBottomMenuMap extends StatelessWidget {
icon: controller.isMainBottomMenuMap
? const Icon(
Icons.ads_click,
color: AppColor.secondaryColor,
size: 35,
)
: const Icon(

View File

@@ -37,7 +37,8 @@ class MapMenuWidget extends StatelessWidget {
opacity: 1, // Adjust the opacity value as needed
child: AnimatedContainer(
width: Get.width * .6,
decoration: AppStyle.boxDecoration,
decoration: AppStyle.boxDecoration
.copyWith(color: AppColor.blueColor),
transform: Matrix4.translationValues(
controller.heightMenu * .1, 1, 1),
curve: Curves.easeOutCubic,
@@ -85,28 +86,11 @@ class MapMenuWidget extends StatelessWidget {
),
Positioned(
right: 5,
top: 110,
top: 80,
child: AnimatedContainer(
duration: const Duration(milliseconds: 300),
decoration: const BoxDecoration(
borderRadius: BorderRadius.all(Radius.circular(12)),
color: AppColor.secondaryColor,
boxShadow: [
BoxShadow(
color: AppColor.accentColor,
offset: Offset(-3, -3),
blurRadius: 0,
spreadRadius: 0,
blurStyle: BlurStyle.outer),
BoxShadow(
color: AppColor.accentColor,
offset: Offset(3, 3),
blurRadius: 0,
spreadRadius: 0,
blurStyle: BlurStyle.outer)
]),
decoration: AppStyle.boxDecoration1,
width: controller.widthMenu,
height: Get.height * .3,
child: Column(
mainAxisAlignment: MainAxisAlignment.spaceAround,
children: [
@@ -136,26 +120,10 @@ class MapMenuWidget extends StatelessWidget {
)),
Positioned(
left: 5,
top: 110,
top: 80,
child: AnimatedContainer(
duration: const Duration(milliseconds: 300),
decoration: const BoxDecoration(
borderRadius: BorderRadius.all(Radius.circular(12)),
color: AppColor.secondaryColor,
boxShadow: [
BoxShadow(
color: AppColor.accentColor,
offset: Offset(-3, -3),
blurRadius: 0,
spreadRadius: 0,
blurStyle: BlurStyle.outer),
BoxShadow(
color: AppColor.accentColor,
offset: Offset(3, 3),
blurRadius: 0,
spreadRadius: 0,
blurStyle: BlurStyle.outer)
]),
decoration: AppStyle.boxDecoration1,
width: controller.widthMenu,
height: Get.height * .3,
child: Column(
@@ -225,23 +193,10 @@ class IconMainPageMap extends StatelessWidget {
builder: (context, snapshot) {
return GestureDetector(
onTap: onTap,
child: Padding(
padding: const EdgeInsets.all(4),
child: Container(
child: SizedBox(
height: Get.height * .1,
width: double.maxFinite,
decoration: const BoxDecoration(
borderRadius: BorderRadius.all(Radius.circular(16)),
color: AppColor.secondaryColor,
boxShadow: [
BoxShadow(
color: AppColor.accentColor,
offset: Offset(3, 3),
blurRadius: 0,
spreadRadius: 0,
blurStyle: BlurStyle.outer,
),
],
),
// decoration: AppStyle.boxDecoration,
child: Padding(
padding: const EdgeInsets.all(8.0),
child: Column(
@@ -255,7 +210,6 @@ class IconMainPageMap extends StatelessWidget {
),
),
),
),
);
});
}

View File

@@ -1,6 +1,5 @@
import 'package:SEFER/constant/links.dart';
import 'package:SEFER/views/home/profile/complaint_page.dart';
import 'package:SEFER/views/widgets/elevated_btn.dart';
import 'package:flutter/material.dart';
import 'package:flutter_font_icons/flutter_font_icons.dart';
import 'package:get/get.dart';

View File

@@ -1,19 +1,18 @@
import 'dart:io';
import 'package:SEFER/constant/box_name.dart';
import 'package:SEFER/main.dart';
import 'package:flutter/material.dart';
import 'package:SEFER/constant/style.dart';
import 'package:flutter/services.dart';
import 'package:vibration/vibration.dart';
import '../../constant/colors.dart';
import 'package:SEFER/constant/box_name.dart';
import 'package:SEFER/constant/colors.dart';
import 'package:SEFER/constant/style.dart';
import 'package:SEFER/main.dart';
class MyElevatedButton extends StatelessWidget {
final String title;
final VoidCallback onPressed;
final Color kolor;
final int vibrateDuration;
const MyElevatedButton({
Key? key,
required this.title,
@@ -24,28 +23,23 @@ class MyElevatedButton extends StatelessWidget {
@override
Widget build(BuildContext context) {
bool vibrate = box.read(BoxName.isvibrate) ?? true;
final bool vibrate = box.read(BoxName.isvibrate) ?? true;
return ElevatedButton(
style: ButtonStyle(
backgroundColor: MaterialStateProperty.all(kolor),
shape: MaterialStateProperty.all(RoundedRectangleBorder(
style: ElevatedButton.styleFrom(
backgroundColor: kolor,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(12.0),
)),
// padding:
// MaterialStateProperty.all(const EdgeInsets.symmetric(vertical: 15)),
),
),
onPressed: () async {
// Handle haptic feedback for both iOS and Android
if (vibrate) {
if (Platform.isIOS) {
HapticFeedback.selectionClick();
} else {
Vibration.vibrate(duration: 100);
// Vibrate.vibrateWithPauses(pauses);
await Vibration.vibrate(duration: vibrateDuration);
}
}
// Ensure the onPressed callback is called after haptic feedback
onPressed();
},
child: Text(

View File

@@ -20,7 +20,7 @@ class IconWidgetMenu extends StatelessWidget {
return InkWell(
onTap: onpressed,
child: Padding(
padding: const EdgeInsets.only(top: 25),
padding: const EdgeInsets.only(top: 1),
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
@@ -29,22 +29,22 @@ class IconWidgetMenu extends StatelessWidget {
decoration: const BoxDecoration(
color: AppColor.secondaryColor,
shape: BoxShape.circle,
boxShadow: [
BoxShadow(
color: AppColor.secondaryColor,
offset: Offset(-2, -2),
blurRadius: 0,
spreadRadius: 0,
blurStyle: BlurStyle.outer,
),
BoxShadow(
color: AppColor.accentColor,
offset: Offset(3, 3),
blurRadius: 0,
spreadRadius: 0,
blurStyle: BlurStyle.outer,
),
],
// boxShadow: [
// BoxShadow(
// color: AppColor.secondaryColor,
// offset: Offset(-2, -2),
// blurRadius: 0,
// spreadRadius: 0,
// blurStyle: BlurStyle.outer,
// ),
// BoxShadow(
// color: AppColor.accentColor,
// offset: Offset(3, 3),
// blurRadius: 0,
// spreadRadius: 0,
// blurStyle: BlurStyle.outer,
// ),
// ],
),
child: Center(
child: Icon(
@@ -56,7 +56,7 @@ class IconWidgetMenu extends StatelessWidget {
),
Text(
title,
style: AppStyle.subtitle,
style: AppStyle.subtitle.copyWith(color: AppColor.secondaryColor),
)
],
),

View File

@@ -25,7 +25,7 @@ class MyCircularProgressIndicator extends StatelessWidget {
children: [
Align(
alignment: Alignment.center,
child: Image.asset('assets/images/logo.png'),
child: Image.asset('assets/images/logo.gif'),
),
],
),

View File

@@ -227,7 +227,7 @@
isa = PBXProject;
attributes = {
LastSwiftUpdateCheck = 0920;
LastUpgradeCheck = 1300;
LastUpgradeCheck = 1510;
ORGANIZATIONNAME = "";
TargetAttributes = {
331C80D4294CF70F00263BE5 = {

View File

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

View File

@@ -1092,26 +1092,26 @@ packages:
dependency: transitive
description:
name: leak_tracker
sha256: "78eb209deea09858f5269f5a5b02be4049535f568c07b275096836f01ea323fa"
sha256: "7f0df31977cb2c0b88585095d168e689669a2cc9b97c309665e3386f3e9d341a"
url: "https://pub.dev"
source: hosted
version: "10.0.0"
version: "10.0.4"
leak_tracker_flutter_testing:
dependency: transitive
description:
name: leak_tracker_flutter_testing
sha256: b46c5e37c19120a8a01918cfaf293547f47269f7cb4b0058f21531c2465d6ef0
sha256: "06e98f569d004c1315b991ded39924b21af84cf14cc94791b8aea337d25b57f8"
url: "https://pub.dev"
source: hosted
version: "2.0.1"
version: "3.0.3"
leak_tracker_testing:
dependency: transitive
description:
name: leak_tracker_testing
sha256: a597f72a664dbd293f3bfc51f9ba69816f84dcd403cdac7066cb3f6003f3ab47
sha256: "6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3"
url: "https://pub.dev"
source: hosted
version: "2.0.1"
version: "3.0.1"
lints:
dependency: transitive
description:
@@ -1212,10 +1212,10 @@ packages:
dependency: transitive
description:
name: meta
sha256: d584fa6707a52763a52446f02cc621b077888fb63b93bbcb1143a7be5a0c0c04
sha256: "7687075e408b093f36e6bbf6c91878cc0d4cd10f409506f7bc996f68220b9136"
url: "https://pub.dev"
source: hosted
version: "1.11.0"
version: "1.12.0"
mime:
dependency: transitive
description:
@@ -1673,10 +1673,10 @@ packages:
dependency: transitive
description:
name: test_api
sha256: "5c2f730018264d276c20e4f1503fd1308dfbbae39ec8ee63c5236311ac06954b"
sha256: "9955ae474176f7ac8ee4e989dadfb411a58c30415bcfb648fa04b2b8a03afa7f"
url: "https://pub.dev"
source: hosted
version: "0.6.1"
version: "0.7.0"
timezone:
dependency: transitive
description:
@@ -1857,10 +1857,10 @@ packages:
dependency: transitive
description:
name: vm_service
sha256: b3d56ff4341b8f182b96aceb2fa20e3dcb336b9f867bc0eafc0de10f1048e957
sha256: "3923c89304b715fb1eb6423f017651664a03bf5f4b29983627c4da791f74a4ec"
url: "https://pub.dev"
source: hosted
version: "13.0.0"
version: "14.2.1"
wakelock_plus:
dependency: "direct main"
description: