This commit is contained in:
Hamza-Ayed
2024-07-05 04:51:14 +03:00
parent b48bcfdebb
commit fec02b13ee
40 changed files with 652 additions and 194 deletions

74
.env
View File

@@ -39,3 +39,77 @@ payMobOutClientSecrret='wcP2bUQBRYy254hjCJhNlOatefDzifNDnXRQSiu6UhhcXfZdyCyiBaUr
payMobOutClient_id='gnBTH5kGzR4RGPwzEUxIKCJx9SA5zAwpXiX4vaiTXrXlBl' payMobOutClient_id='gnBTH5kGzR4RGPwzEUxIKCJx9SA5zAwpXiX4vaiTXrXlBl'
payMobOutPassword='#f9vZtxHdIGvAbl5wWMQkvgZTXrXlBl' payMobOutPassword='#f9vZtxHdIGvAbl5wWMQkvgZTXrXlBl'
payMobOutUserName='zjujl_qvo_fwjfgjlXrXlBl' payMobOutUserName='zjujl_qvo_fwjfgjlXrXlBl'
import '../controller/functions/encrypt.dart';
import '../env/env.dart';
import 'char_map.dart';
import 'credential.dart';
class AK {
static final AC a = AC();
static final String publishableKey =
KeyEncryption.decryptKey(Env.stripePublishableKe);
static final String secretKey = KeyEncryption.decryptKey(Env.secretKey);
static final String basicAuthCredentials =
KeyEncryption.decryptKey(Env.basicAuthCredentials);
static final String accountSIDTwillo =
KeyEncryption.decryptKey(Env.accountSIDTwillo);
static final String serverAPI = KeyEncryption.decryptKey(Env.serverAPI);
static final String mapAPIKEY = KeyEncryption.decryptKey(Env.mapAPIKEY);
static final String twilloRecoveryCode =
KeyEncryption.decryptKey(Env.twilloRecoveryCode);
static final String authTokenTwillo =
KeyEncryption.decryptKey(Env.authTokenTwillo);
static final String chatGPTkey = KeyEncryption.decryptKey(Env.chatGPTkey);
static final String transactionCloude =
KeyEncryption.decryptKey(Env.transactionCloude);
static final String visionApi = KeyEncryption.decryptKey(Env.visionApi);
static final String chatGPTkeySefer =
KeyEncryption.decryptKey(Env.chatGPTkeySefer);
static final String chatGPTkeySeferNew =
KeyEncryption.decryptKey(Env.chatGPTkeySeferNew);
static final String serverPHP = Env.serverPHP;
static final String llamaKey = KeyEncryption.decryptKey(Env.llamaKey);
static final String cohere = KeyEncryption.decryptKey(Env.cohere);
static final String claudeAiAPI = KeyEncryption.decryptKey(Env.claudeAiAPI);
static final String payPalClientId =
KeyEncryption.decryptKey(Env.payPalClientId);
static final String payPalSecret = KeyEncryption.decryptKey(Env.payPalSecret);
static final String geminiApi = KeyEncryption.decryptKey(Env.geminiApi);
static final String agoraAppId = KeyEncryption.decryptKey(Env.agoraAppId);
static final String agoraAppCertificate =
KeyEncryption.decryptKey(Env.agoraAppCertificate);
static final String payPalClientIdLive =
KeyEncryption.decryptKey(Env.payPalClientIdLive);
static final String payPalSecretLive =
KeyEncryption.decryptKey(Env.payPalSecretLive);
static final String integrationIdPayMob =
KeyEncryption.decryptKey(Env.integrationIdPayMob);
static final String passwordPayMob =
KeyEncryption.decryptKey(Env.passwordPayMob);
static final String usernamePayMob =
KeyEncryption.decryptKey(Env.usernamePayMob);
static final String payMobApikey = KeyEncryption.decryptKey(Env.payMobApikey);
static final String integrationIdPayMobWallet =
KeyEncryption.decryptKey(Env.integrationIdPayMobWallet);
static final String smsPasswordEgypt =
KeyEncryption.decryptKey(Env.smsPasswordEgypt);
static final String ocpApimSubscriptionKey = Env.ocpApimSubscriptionKey;
static final String chatGPTkeySeferNew4 =
KeyEncryption.decryptKey(Env.chatGPTkeySeferNew4);
static final String anthropicAIkeySeferNew =
KeyEncryption.decryptKey(Env.anthropicAIkeySeferNew);
static final String llama3Key = KeyEncryption.decryptKey(Env.llama3Key);
static final String payMobOutClientSecrret =
KeyEncryption.decryptKey(Env.payMobOutClientSecrret);
static final String payMobOutClient_id =
KeyEncryption.decryptKey(Env.payMobOutClient_id);
static final String payMobOutPassword =
KeyEncryption.decryptKey(Env.payMobOutPassword);
static final String payMobOutUserName =
KeyEncryption.decryptKey(Env.payMobOutUserName);
}

View File

@@ -55,8 +55,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.
minSdkVersion 23 minSdkVersion 23
targetSdkVersion 33 targetSdkVersion 33
versionCode 42 versionCode 45
versionName '1.5.42' versionName '1.5.45'
// manifestPlaceholders = [mapsApiKey: 'android/app/src/main/AndroidManifest.xml'] // manifestPlaceholders = [mapsApiKey: 'android/app/src/main/AndroidManifest.xml']
} }

Binary file not shown.

Before

Width:  |  Height:  |  Size: 41 KiB

After

Width:  |  Height:  |  Size: 61 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.0 KiB

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.3 KiB

After

Width:  |  Height:  |  Size: 6.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.0 KiB

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.6 KiB

After

Width:  |  Height:  |  Size: 17 KiB

BIN
assets/images/lady1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 214 KiB

After

Width:  |  Height:  |  Size: 61 KiB

BIN
assets/images/moto1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.2 KiB

View File

@@ -37,11 +37,11 @@
<key>CFBundlePackageType</key> <key>CFBundlePackageType</key>
<string>APPL</string> <string>APPL</string>
<key>CFBundleShortVersionString</key> <key>CFBundleShortVersionString</key>
<string>40</string> <string>41</string>
<key>CFBundleSignature</key> <key>CFBundleSignature</key>
<string>????</string> <string>????</string>
<key>CFBundleVersion</key> <key>CFBundleVersion</key>
<string>4.3.40</string> <string>4.3.41</string>
<key>FirebaseAppDelegateProxyEnabled</key> <key>FirebaseAppDelegateProxyEnabled</key>
<string>NO</string> <string>NO</string>
<key>GMSApiKey</key> <key>GMSApiKey</key>

View File

@@ -190,9 +190,13 @@ class AppLink {
static String auth = '$server/auth'; static String auth = '$server/auth';
static String login = "$auth/login.php"; static String login = "$auth/login.php";
static String getTesterApp = "$auth/Tester/getTesterApp.php";
static String updateTesterApp = "$auth/Tester/updateTesterApp.php";
static String signUp = "$auth/signup.php"; static String signUp = "$auth/signup.php";
static String sendVerifyEmail = "$auth/sendVerifyEmail.php"; static String sendVerifyEmail = "$auth/sendVerifyEmail.php";
static String loginFromGooglePassenger = "$auth/loginFromGooglePassenger.php"; static String loginFromGooglePassenger = "$auth/loginFromGooglePassenger.php";
static String checkPhoneNumberISVerfiedPassenger =
"$auth/checkPhoneNumberISVerfiedPassenger.php";
static String passengerRemovedAccountEmail = static String passengerRemovedAccountEmail =
"$auth/passengerRemovedAccountEmail.php"; "$auth/passengerRemovedAccountEmail.php";

View File

@@ -1,16 +1,15 @@
import 'dart:convert'; import 'dart:convert';
import 'dart:math';
import 'package:SEFER/constant/info.dart';
import 'package:SEFER/controller/firebase/firbase_messge.dart'; import 'package:SEFER/controller/firebase/firbase_messge.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: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';
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/secure_storage.dart';
import 'package:SEFER/main.dart'; import 'package:SEFER/main.dart';
import 'package:SEFER/views/auth/verify_email_page.dart';
import 'package:SEFER/views/home/map_page_passenger.dart'; import 'package:SEFER/views/home/map_page_passenger.dart';
import 'package:location/location.dart'; import 'package:location/location.dart';
@@ -24,12 +23,30 @@ class LoginController extends GetxController {
TextEditingController adminNameController = TextEditingController(); TextEditingController adminNameController = TextEditingController();
bool isAgreeTerms = false; bool isAgreeTerms = false;
bool isloading = false; bool isloading = false;
late int isTest = 1;
void changeAgreeTerm() { void changeAgreeTerm() {
isAgreeTerms = !isAgreeTerms; isAgreeTerms = !isAgreeTerms;
update(); update();
} }
getAppTester(String appPlatform) async {
var res = await CRUD()
.get(link: AppLink.getTesterApp, payload: {'appPlatform': appPlatform});
if (res != 'failure') {
var d = jsonDecode(res);
isTest = d['message'][0]['isTest'];
update();
} else {
return false;
}
}
updateAppTester(String appPlatform) async {
await CRUD().post(
link: AppLink.updateTesterApp, payload: {'appPlatform': appPlatform});
}
void saveAgreementTerms() { void saveAgreementTerms() {
box.write(BoxName.agreeTerms, 'agreed'); box.write(BoxName.agreeTerms, 'agreed');
update(); update();
@@ -49,7 +66,6 @@ class LoginController extends GetxController {
'id': passengerID, 'id': passengerID,
}); });
if (res == 'Failure') { if (res == 'Failure') {
//Failure
Get.offAll(SmsSignupEgypt()); Get.offAll(SmsSignupEgypt());
isloading = false; isloading = false;
update(); update();
@@ -142,57 +158,41 @@ class LoginController extends GetxController {
void login() async { void login() async {
isloading = true; isloading = true;
update(); update();
var res = await CRUD().get(link: AppLink.login, payload: { var res = await CRUD().get(
'email': emailController.text, link: AppLink.loginFromGooglePassenger,
'phone': phoneController.text, payload: {
'password': passwordController.text 'email': emailController.text,
}); 'id': passwordController.text
});
isloading = false; isloading = false;
update(); update();
if (res == 'Failure') { if (res == 'Failure') {
Get.snackbar('Failure', '', backgroundColor: Colors.red); //Failure
Get.offAll(() => LoginPage());
isloading = false;
update();
// Get.snackbar("User does not exist.".tr, '', backgroundColor: Colors.red);
} else { } else {
var jsonDecoeded = jsonDecode(res); var jsonDecoeded = jsonDecode(res);
if (jsonDecoeded.isNotEmpty) { if (jsonDecoeded.isNotEmpty) {
if (jsonDecoeded['status'] == 'success') { if (jsonDecoeded['status'] == 'success' &&
if (jsonDecoeded['data'][0]['verified'] == 1) { jsonDecoeded['data'][0]['verified'] == 1) {
box.write(BoxName.passengerID, jsonDecoeded['data'][0]['id']); //
box.write(BoxName.email, jsonDecoeded['data'][0]['email']); box.write(BoxName.isVerified, '1');
box.write( box.write(BoxName.email, jsonDecoeded['data'][0]['email']);
BoxName.name, box.write(BoxName.phone, jsonDecoeded['data'][0]['phone']);
jsonDecoeded['data'][0]['first_name'] + box.write(BoxName.passengerID, passwordController.text);
' ' + // var token = await CRUD().get(link: AppLink.getTokens, payload: {
jsonDecoeded['data'][0]['last_name']); // 'passengerID': box.read(BoxName.passengerID).toString()
box.write(BoxName.phone, jsonDecoeded['data'][0]['phone']); // });
SecureStorage().saveData(BoxName.password, passwordController.text); await updateAppTester(AppInformation.appName);
Get.offAll(() => const MapPagePassenger());
isloading = false;
update();
await CRUD().post(link: AppLink.addTokens, payload: { Get.offAll(() => const MapPagePassenger());
'token': box.read(BoxName.tokenFCM), } else {
'passengerID': box.read(BoxName.passengerID).toString() // Get.offAll(() => SmsSignupEgypt());
}); // Get.snackbar(jsonDecoeded['status'], jsonDecoeded['data'],
} else { // backgroundColor: Colors.redAccent);
isloading = false;
update();
Get.defaultDialog(
title: 'You must Verify email !.'.tr,
middleText: '',
backgroundColor: Colors.yellow[300],
onConfirm: () async {
int randomNumber = Random().nextInt(100000) + 1;
await CRUD().post(link: AppLink.sendVerifyEmail, payload: {
'email': emailController.text,
'token': randomNumber.toString(),
});
Get.to(() => const VerifyEmailPage());
},
);
}
} else if (jsonDecoeded['status'] == 'Failure') {
Get.snackbar(jsonDecoeded['status'], jsonDecoeded['data'],
backgroundColor: Colors.redAccent);
isloading = false; isloading = false;
update(); update();
} }
@@ -245,7 +245,11 @@ class LoginController extends GetxController {
@override @override
void onInit() async { void onInit() async {
// permissionLocation = await Permission.locationWhenInUse.isGranted; // permissionLocation = await Permission.locationWhenInUse.isGranted;
await getAppTester(AppInformation.appName);
if (isTest == 0 && box.read(BoxName.passengerID) != null) {
await loginUsingCredentials(
box.read(BoxName.passengerID), box.read(BoxName.email));
}
super.onInit(); super.onInit();
} }
} }

View File

@@ -2,6 +2,7 @@ import 'dart:async';
import 'dart:convert'; import 'dart:convert';
import 'dart:math'; import 'dart:math';
import 'package:SEFER/constant/colors.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';
@@ -88,18 +89,33 @@ class RegisterController extends GetxController {
update(); update();
if (formKey3.currentState!.validate()) { if (formKey3.currentState!.validate()) {
if (box.read(BoxName.countryCode) == 'Egypt') { if (box.read(BoxName.countryCode) == 'Egypt') {
await CRUD().post(link: AppLink.sendVerifyOtpMessage, payload: { var responseCheker = await CRUD()
.post(link: AppLink.checkPhoneNumberISVerfiedPassenger, payload: {
'phone_number': '+2${phoneController.text}', 'phone_number': '+2${phoneController.text}',
'token': randomNumber.toString(),
}); });
if (responseCheker != 'failure') {
var d = jsonDecode(responseCheker);
if (d['message'][0]['verified'] == 1) {
Get.snackbar('Phone number is verified before'.tr, '',
backgroundColor: AppColor.greenColor);
box.write(BoxName.isVerified, '1');
box.write(BoxName.phone, '+2${phoneController.text}');
Get.offAll(const MapPagePassenger());
}
} else {
await CRUD().post(link: AppLink.sendVerifyOtpMessage, payload: {
'phone_number': '+2${phoneController.text}',
'token': randomNumber.toString(),
});
await smsEgyptController.sendSmsEgypt( await smsEgyptController.sendSmsEgypt(
phoneController.text.toString(), randomNumber.toString()); phoneController.text.toString(), randomNumber.toString());
isSent = true; isSent = true;
remainingTime = 300; // Reset to 5 minutes remainingTime = 300; // Reset to 5 minutes
startTimer(); startTimer();
isLoading = false; isLoading = false;
update(); update();
}
} }
} }
} }
@@ -129,7 +145,7 @@ class RegisterController extends GetxController {
link: AppLink.signUp, link: AppLink.signUp,
payload: payload, payload: payload,
); );
if (jsonDecode(res1)['status'] == 'success') { if (res1 != 'failure') {
box.write(BoxName.isVerified, '1'); box.write(BoxName.isVerified, '1');
box.write(BoxName.phone, '+2${phoneController.text}'); box.write(BoxName.phone, '+2${phoneController.text}');
Get.offAll(const MapPagePassenger()); Get.offAll(const MapPagePassenger());

View File

@@ -117,8 +117,8 @@ class FirebaseMessagesController extends GetxController {
} }
void fireBaseTitles(RemoteMessage message) { void fireBaseTitles(RemoteMessage message) {
if (message.notification!.title! == 'Order') { if (message.notification!.title! == 'Order'.tr) {
} else if (message.notification!.title! == 'Apply Ride') { } else if (message.notification!.title! == 'Apply Ride'.tr) {
var passengerList = message.data['passengerList']; var passengerList = message.data['passengerList'];
var myList = jsonDecode(passengerList) as List<dynamic>; var myList = jsonDecode(passengerList) as List<dynamic>;
@@ -130,7 +130,7 @@ class FirebaseMessagesController extends GetxController {
NotificationController().showNotification( NotificationController().showNotification(
'Apply Order'.tr, 'Driver Applied the Ride for You'.tr, 'order1'); 'Apply Order'.tr, 'Driver Applied the Ride for You'.tr, 'order1');
// driverAppliedTripSnakBar(); // driverAppliedTripSnakBar();
} else if (message.notification!.title! == 'Promo') { } else if (message.notification!.title! == 'Promo'.tr) {
NotificationController() NotificationController()
.showNotification('Promo', 'Show latest promo'.tr, 'promo'); .showNotification('Promo', 'Show latest promo'.tr, 'promo');
Get.to(const PromosPassengerPage()); Get.to(const PromosPassengerPage());
@@ -143,11 +143,11 @@ class FirebaseMessagesController extends GetxController {
'rideId': myList[0].toString(), 'rideId': myList[0].toString(),
'driverId': myList[1].toString(), 'driverId': myList[1].toString(),
}); });
} else if (message.notification!.title! == 'token change') { } else if (message.notification!.title! == 'token change'.tr) {
NotificationController() NotificationController()
.showNotification('token change', 'token change', 'cancel'); .showNotification('token change'.tr, 'token change'.tr, 'cancel');
GoogleSignInHelper.signOut(); GoogleSignInHelper.signOut();
} else if (message.notification!.title! == 'DriverIsGoingToPassenger') { } else if (message.notification!.title! == 'DriverIsGoingToPassenger'.tr) {
Get.find<MapPassengerController>().isDriverInPassengerWay = true; Get.find<MapPassengerController>().isDriverInPassengerWay = true;
Get.find<MapPassengerController>().update(); Get.find<MapPassengerController>().update();
NotificationController().showNotification('Driver is Going To You'.tr, NotificationController().showNotification('Driver is Going To You'.tr,
@@ -160,32 +160,32 @@ class FirebaseMessagesController extends GetxController {
passengerDialog(message.notification!.body!); passengerDialog(message.notification!.body!);
update(); update();
} else if (message.notification!.title! == 'message From Driver'.tr) { } else if (message.notification!.title! == 'message From Driver') {
NotificationController() NotificationController()
.showNotification('message From passenger'.tr, ''.tr, 'tone2'); .showNotification('message From passenger'.tr, ''.tr, 'tone2');
passengerDialog(message.notification!.body!); passengerDialog(message.notification!.body!);
update(); update();
} else if (message.notification!.title! == 'RideIsBegin') { } else if (message.notification!.title! == 'RideIsBegin'.tr) {
Get.find<MapPassengerController>().getBeginRideFromDriver(); Get.find<MapPassengerController>().getBeginRideFromDriver();
// Get.snackbar('RideIsBegin', '', backgroundColor: AppColor.greenColor); // Get.snackbar('RideIsBegin', '', backgroundColor: AppColor.greenColor);
box.write(BoxName.passengerWalletTotal, '0'); box.write(BoxName.passengerWalletTotal, '0');
NotificationController() NotificationController()
.showNotification('Trip is Begin'.tr, ''.tr, 'start'); .showNotification('Trip is Begin'.tr, ''.tr, 'start');
update(); update();
} else if (message.notification!.title! == 'Hi ,I will go now') { } else if (message.notification!.title! == 'Hi ,I will go now'.tr) {
// Get.snackbar('Hi ,I will go now', '', // Get.snackbar('Hi ,I will go now', '',
// backgroundColor: AppColor.greenColor); // backgroundColor: AppColor.greenColor);
NotificationController().showNotification( NotificationController().showNotification(
'Passenger come to you'.tr, 'Hi ,I will go now'.tr, 'tone2'); 'Passenger come to you'.tr, 'Hi ,I will go now'.tr, 'tone2');
update(); update();
} else if (message.notification!.title! == 'Hi ,I Arrive your site') { } else if (message.notification!.title! == 'Hi ,I Arrive your site'.tr) {
NotificationController() NotificationController()
.showNotification('Hi ,I Arrive your site'.tr, ''.tr, 'tone2'); .showNotification('Hi ,I Arrive your site'.tr, ''.tr, 'tone2');
driverArrivePassengerDialoge(); driverArrivePassengerDialoge();
update(); update();
} else if (message.notification!.title! == 'Driver Finish Trip') { } else if (message.notification!.title! == 'Driver Finish Trip'.tr) {
var myListString = message.data['passengerList']; var myListString = message.data['passengerList'];
var driverList = jsonDecode(myListString) as List<dynamic>; var driverList = jsonDecode(myListString) as List<dynamic>;
NotificationController().showNotification( NotificationController().showNotification(
@@ -204,7 +204,7 @@ class FirebaseMessagesController extends GetxController {
'price': driverList[3].toString() 'price': driverList[3].toString()
}); });
// } // }
} else if (message.notification!.title! == "Finish Monitor") { } else if (message.notification!.title! == "Finish Monitor".tr) {
Get.defaultDialog( Get.defaultDialog(
titleStyle: AppStyle.title, titleStyle: AppStyle.title,
title: 'Trip finished '.tr, title: 'Trip finished '.tr,
@@ -214,6 +214,8 @@ class FirebaseMessagesController extends GetxController {
onPressed: () { onPressed: () {
Get.offAll(() => const MapPagePassenger()); Get.offAll(() => const MapPagePassenger());
})); }));
} else if (message.notification!.title! == "Trip Monitoring".tr) {
Get.to(() => const TripMonitor());
} else if (message.notification!.title! == 'Call Income') { } else if (message.notification!.title! == 'Call Income') {
try { try {
var myListString = message.data['passengerList']; var myListString = message.data['passengerList'];
@@ -232,7 +234,7 @@ class FirebaseMessagesController extends GetxController {
remoteID: driverList[2].toString(), remoteID: driverList[2].toString(),
)); ));
} catch (e) {} } catch (e) {}
} else if (message.notification!.title! == 'Call Income from Driver') { } else if (message.notification!.title! == 'Call Income from Driver'.tr) {
try { try {
var myListString = message.data['passengerList']; var myListString = message.data['passengerList'];
var driverList = jsonDecode(myListString) as List<dynamic>; var driverList = jsonDecode(myListString) as List<dynamic>;
@@ -250,7 +252,7 @@ class FirebaseMessagesController extends GetxController {
remoteID: driverList[2].toString(), remoteID: driverList[2].toString(),
)); ));
} catch (e) {} } catch (e) {}
} else if (message.notification!.title! == 'Call End') { } else if (message.notification!.title! == 'Call End'.tr) {
try { try {
var myListString = message.data['passengerList']; var myListString = message.data['passengerList'];
var driverList = jsonDecode(myListString) as List<dynamic>; var driverList = jsonDecode(myListString) as List<dynamic>;
@@ -264,7 +266,7 @@ class FirebaseMessagesController extends GetxController {
// Assuming GetMaterialApp is initialized and context is valid for navigation // Assuming GetMaterialApp is initialized and context is valid for navigation
// Get.off(const CallPage()); // Get.off(const CallPage());
} catch (e) {} } catch (e) {}
} else if (message.notification!.title! == 'Driver Cancel Your Trip') { } else if (message.notification!.title! == 'Driver Cancel Your Trip'.tr) {
// Get.snackbar( // Get.snackbar(
// 'You will be pay the cost to driver or we will get it from you on next trip' // 'You will be pay the cost to driver or we will get it from you on next trip'
// .tr, // .tr,
@@ -294,7 +296,7 @@ class FirebaseMessagesController extends GetxController {
// ); // );
// } // }
else if (message.notification!.title! == 'Order Applied') { else if (message.notification!.title! == 'Order Applied'.tr) {
NotificationController().showNotification( NotificationController().showNotification(
'The order Accepted by another Driver'.tr, 'The order Accepted by another Driver'.tr,
'We regret to inform you that another driver has accepted this order.' 'We regret to inform you that another driver has accepted this order.'

View File

@@ -28,6 +28,7 @@ class CRUD {
}, },
); );
print(response.request); print(response.request);
print(response.body);
// 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') {
@@ -227,7 +228,8 @@ class CRUD {
'Basic ${base64Encode(utf8.encode(AK.basicAuthCredentials))}', 'Basic ${base64Encode(utf8.encode(AK.basicAuthCredentials))}',
}, },
); );
print(response.request);
print(response.body);
var jsonData = jsonDecode(response.body); var jsonData = jsonDecode(response.body);
if (response.statusCode == 200) { if (response.statusCode == 200) {
if (jsonData['status'] == 'success') { if (jsonData['status'] == 'success') {

View File

@@ -45,7 +45,9 @@ class MapPassengerController extends GetxController {
TextEditingController wayPoint4Controller = TextEditingController(); TextEditingController wayPoint4Controller = TextEditingController();
TextEditingController sosPhonePassengerProfile = TextEditingController(); TextEditingController sosPhonePassengerProfile = TextEditingController();
TextEditingController whatsAppLocationText = TextEditingController(); TextEditingController whatsAppLocationText = TextEditingController();
TextEditingController messageToDriver = TextEditingController();
final sosFormKey = GlobalKey<FormState>(); final sosFormKey = GlobalKey<FormState>();
final messagesFormKey = GlobalKey<FormState>();
final increaseFeeFormKey = GlobalKey<FormState>(); final increaseFeeFormKey = GlobalKey<FormState>();
List data = []; List data = [];
List<LatLng> bounds = []; List<LatLng> bounds = [];
@@ -96,6 +98,8 @@ class MapPassengerController extends GetxController {
BitmapDescriptor startIcon = BitmapDescriptor.defaultMarker; BitmapDescriptor startIcon = BitmapDescriptor.defaultMarker;
BitmapDescriptor endIcon = BitmapDescriptor.defaultMarker; BitmapDescriptor endIcon = BitmapDescriptor.defaultMarker;
BitmapDescriptor carIcon = BitmapDescriptor.defaultMarker; BitmapDescriptor carIcon = BitmapDescriptor.defaultMarker;
BitmapDescriptor motoIcon = BitmapDescriptor.defaultMarker;
BitmapDescriptor ladyIcon = BitmapDescriptor.defaultMarker;
double height = 150; double height = 150;
DateTime currentTime = DateTime.now(); DateTime currentTime = DateTime.now();
final location = Location(); final location = Location();
@@ -1235,6 +1239,7 @@ class MapPassengerController extends GetxController {
void timerEnded() async { void timerEnded() async {
runEvery30SecondsUntilConditionMet(); runEvery30SecondsUntilConditionMet();
isCancelRidePageShown = false; isCancelRidePageShown = false;
print('isCancelRidePageShown: ${isCancelRidePageShown}');
update(); update();
} }
@@ -1266,7 +1271,7 @@ class MapPassengerController extends GetxController {
driversToken.remove(driverToken); driversToken.remove(driverToken);
for (var i = 1; i < driversToken.length; i++) { for (var i = 1; i < driversToken.length; i++) {
FirebaseMessagesController().sendNotificationToAnyWithoutData( FirebaseMessagesController().sendNotificationToAnyWithoutData(
'Order Applied', 'Order Applied'.tr,
'$driverName Apply order\nTake attention in other order'.tr, '$driverName Apply order\nTake attention in other order'.tr,
driversToken[i], driversToken[i],
'start.wav', 'start.wav',
@@ -1345,9 +1350,9 @@ class MapPassengerController extends GetxController {
i < dataCarsLocationByPassenger['message'].length; i < dataCarsLocationByPassenger['message'].length;
i++) { i++) {
var json = dataCarsLocationByPassenger['message'][i]; var json = dataCarsLocationByPassenger['message'][i];
CarLocationModel model = CarLocationModel.fromJson(json); // CarLocationModel model = CarLocationModel.fromJson(json);
if (carLocationsModels.length < i + 1) { if (carLocationsModels.length < i + 1) {
carLocationsModels.add(model); // carLocationsModels.add(model);
markers.add( markers.add(
Marker( Marker(
markerId: MarkerId(json['latitude']), markerId: MarkerId(json['latitude']),
@@ -1356,13 +1361,17 @@ class MapPassengerController extends GetxController {
double.parse(json['longitude']), double.parse(json['longitude']),
), ),
rotation: double.parse(json['heading']), rotation: double.parse(json['heading']),
icon: carIcon, icon: json['model'].toString().contains('دراجة')
? motoIcon
: json['gender'] == 'Male'
? carIcon
: ladyIcon,
), ),
); );
driversToken.add(json['token']); driversToken.add(json['token']);
// driversToken = json['token']; // driversToken = json['token'];
} else { } else {
carLocationsModels[i] = model; // carLocationsModels[i] = model;
markers[i] = Marker( markers[i] = Marker(
markerId: MarkerId(json['latitude']), markerId: MarkerId(json['latitude']),
position: LatLng( position: LatLng(
@@ -1370,7 +1379,11 @@ class MapPassengerController extends GetxController {
double.parse(json['longitude']), double.parse(json['longitude']),
), ),
rotation: double.parse(json['heading']), rotation: double.parse(json['heading']),
icon: carIcon, icon: json['model'].contains('دراجة')
? motoIcon
: json['gender'] == 'Male'
? carIcon
: ladyIcon,
); );
// driversToken = json['token']; // driversToken = json['token'];
driversToken.add(json['token']); driversToken.add(json['token']);
@@ -1517,7 +1530,7 @@ class MapPassengerController extends GetxController {
for (var i = 0; i < loopCount; i++) { for (var i = 0; i < loopCount; i++) {
// Wait for 50 seconds. // Wait for 50 seconds.
await Future.delayed(const Duration(seconds: 4)); await Future.delayed(const Duration(seconds: 4));
if (rideTimerBegin == true) { if (rideTimerBegin == true || statusRide == 'Apply') {
await getDriverCarsLocationToPassengerAfterApplied(); await getDriverCarsLocationToPassengerAfterApplied();
} }
reloadMarkerDriverCarsLocationToPassengerAfterApplied(); reloadMarkerDriverCarsLocationToPassengerAfterApplied();
@@ -1566,8 +1579,16 @@ class MapPassengerController extends GetxController {
rotation: double.parse( rotation: double.parse(
datadriverCarsLocationToPassengerAfterApplied['message'][0] datadriverCarsLocationToPassengerAfterApplied['message'][0]
['heading']), ['heading']),
icon: carIcon, icon: datadriverCarsLocationToPassengerAfterApplied['message'][0]['model']
.contains('دراجة')
? motoIcon
: datadriverCarsLocationToPassengerAfterApplied['message'][0]
['gender'] ==
'Male'
? carIcon
: ladyIcon, // Default to carIcon if gender is not Male or Female
); );
markers.add(driverAcceptedMarker); markers.add(driverAcceptedMarker);
// update(); // update();
mapController?.animateCamera(CameraUpdate.newLatLng(driverPosition)); mapController?.animateCamera(CameraUpdate.newLatLng(driverPosition));
@@ -1620,8 +1641,9 @@ class MapPassengerController extends GetxController {
"order_id": rideId.toString(), // Convert to String "order_id": rideId.toString(), // Convert to String
"status": 'Cancel' "status": 'Cancel'
}); });
print('Cancel');
FirebaseMessagesController().sendNotificationToDriverMAP( FirebaseMessagesController().sendNotificationToDriverMAP(
'Cancel Trip'.tr, 'Cancel Trip',
'Trip Cancelled'.tr, 'Trip Cancelled'.tr,
driverToken, driverToken,
[], [],
@@ -1922,6 +1944,28 @@ class MapPassengerController extends GetxController {
}); });
} }
void addCustomMotoIcon() {
ImageConfiguration config = ImageConfiguration(
size: const Size(30, 30), devicePixelRatio: Get.pixelRatio);
BitmapDescriptor.fromAssetImage(config, 'assets/images/moto1.png',
mipmaps: false)
.then((value) {
motoIcon = value;
update();
});
}
void addCustomLadyIcon() {
ImageConfiguration config = ImageConfiguration(
size: const Size(30, 30), devicePixelRatio: Get.pixelRatio);
BitmapDescriptor.fromAssetImage(config, 'assets/images/lady1.png',
mipmaps: false)
.then((value) {
ladyIcon = value;
update();
});
}
void addCustomStepIcon() { void addCustomStepIcon() {
ImageConfiguration config = ImageConfiguration( ImageConfiguration config = ImageConfiguration(
size: const Size(30, 30), devicePixelRatio: Get.pixelRatio); size: const Size(30, 30), devicePixelRatio: Get.pixelRatio);
@@ -2253,7 +2297,7 @@ class MapPassengerController extends GetxController {
isLoading = false; isLoading = false;
update(); update();
var url = var url =
('${AppLink.googleMapsLink}directions/json?&language=${box.read(BoxName.lang)}&avoid=tolls|ferries&destination=$destination&origin=$origin&key=${AK.mapAPIKEY}'); ('${AppLink.googleMapsLink}directions/json?&language=ar&avoid=tolls|ferries&destination=$destination&origin=$origin&key=${AK.mapAPIKEY}');
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'];
@@ -2342,14 +2386,17 @@ class MapPassengerController extends GetxController {
// Initialize the short address // Initialize the short address
String shortAddress = ''; String shortAddress = '';
// Add the first part (usually the most specific location)
if (parts.isNotEmpty) { if (parts.isNotEmpty) {
// Add the first part (usually the most specific location)
shortAddress += parts[0]; shortAddress += parts[0];
} }
// Add the district or area name (usually the third part in this format)
if (parts.length > 2) { if (parts.length > 2) {
// Add the district or area name (usually the third part in Arabic format)
shortAddress += '، ${parts[2]}'; shortAddress += '، ${parts[2]}';
} else if (parts.length > 1) {
// Add the second part for English or shorter addresses
shortAddress += '، ${parts[1]}';
} }
// Add the country (usually the last part) // Add the country (usually the last part)
@@ -2363,6 +2410,21 @@ class MapPassengerController extends GetxController {
.where((part) => !RegExp(r'^[0-9 ]+$').hasMatch(part.trim())) .where((part) => !RegExp(r'^[0-9 ]+$').hasMatch(part.trim()))
.join('،'); .join('،');
// Check if the address is in English
bool isEnglish =
RegExp(r'^[a-zA-Z0-9 ]+$').hasMatch(shortAddress.replaceAll('،', ''));
if (isEnglish) {
// Further processing for English addresses
List<String> englishParts = shortAddress.split('،');
if (englishParts.length > 2) {
shortAddress =
'${englishParts[0]}، ${englishParts[1]}، ${englishParts.last}';
} else if (englishParts.length > 1) {
shortAddress = '${englishParts[0]}، ${englishParts.last}';
}
}
return shortAddress; return shortAddress;
} }
@@ -2809,6 +2871,8 @@ class MapPassengerController extends GetxController {
readyWayPoints(); readyWayPoints();
addCustomPicker(); addCustomPicker();
addCustomCarIcon(); addCustomCarIcon();
addCustomLadyIcon();
addCustomMotoIcon();
addCustomStepIcon(); addCustomStepIcon();
addCustomStartIcon(); addCustomStartIcon();
addCustomEndIcon(); addCustomEndIcon();

View File

@@ -17,6 +17,8 @@ class TripMonitorController extends GetxController {
late Timer timer; late Timer timer;
late LatLng parentLocation; late LatLng parentLocation;
BitmapDescriptor carIcon = BitmapDescriptor.defaultMarker; BitmapDescriptor carIcon = BitmapDescriptor.defaultMarker;
BitmapDescriptor motoIcon = BitmapDescriptor.defaultMarker;
BitmapDescriptor ladyIcon = BitmapDescriptor.defaultMarker;
double rotation = 0; double rotation = 0;
double speed = 0; double speed = 0;
@@ -65,6 +67,27 @@ class TripMonitorController extends GetxController {
carIcon = value; carIcon = value;
update(); update();
}); });
void addCustomMotoIcon() {
ImageConfiguration config = ImageConfiguration(
size: const Size(30, 30), devicePixelRatio: Get.pixelRatio);
BitmapDescriptor.fromAssetImage(config, 'assets/images/moto1.png',
mipmaps: false)
.then((value) {
motoIcon = value;
update();
});
}
void addCustomLadyIcon() {
ImageConfiguration config = ImageConfiguration(
size: const Size(30, 30), devicePixelRatio: Get.pixelRatio);
BitmapDescriptor.fromAssetImage(config, 'assets/images/lady1.png',
mipmaps: false)
.then((value) {
ladyIcon = value;
update();
});
}
} }
@override @override

View File

@@ -4,6 +4,22 @@ class MyTranslation extends Translations {
@override @override
Map<String, Map<String, String>> get keys => { Map<String, Map<String, String>> get keys => {
"ar": { "ar": {
'message From Driver': '‏رسالة من السائق',
'message From passenger': "رسالة من الراكب",
"Where are you, sir?": "أنا وصلت حضرتك فين.",
"I've been trying to reach you but your phone is off.":
"بحاول أكلمك التلفون مغلق.",
"Please don't be late": "أرجو عدم التأخير",
"Please don't be late, I'm waiting for you at the specified location.":
"أرجو عدم التأخير، أنا منتظرك على ال لوكيشن المحدد.",
"My location is correct. You can search for me using the navigation app":
"موقعي صحيح. يمكنك البحث عني باستخدام تطبيق الملاحة",
"Hello, I'm at the agreed-upon location":
"مرحباً، أنا في المكان المتفق عليه",
"message From Driver": "رسالة من السائق",
"How much longer will you be?": "‏قدامك قد إيه",
'Phone number is verified before': "تم التحقق من رقم الهاتف مسبقاً",
'Change Ride': 'تغيير الرحلة', 'Change Ride': 'تغيير الرحلة',
'You can change the destination by long-pressing any point on the map': 'You can change the destination by long-pressing any point on the map':
'يمكنك تغيير الوجهة بالضغط مطولاً على أي نقطة على الخريطة', 'يمكنك تغيير الوجهة بالضغط مطولاً على أي نقطة على الخريطة',
@@ -423,7 +439,7 @@ iOS [https://getapp.cc/app/6458734951]
"تَلْتَزِم سَفَر بِالسَّلَامَة، وَيَتِمُّ فَحْص جَمِيع قَبَاطِنِنَا بِعِنَايَة وَفَحْص خَلْفِيَّتِهِم.", "تَلْتَزِم سَفَر بِالسَّلَامَة، وَيَتِمُّ فَحْص جَمِيع قَبَاطِنِنَا بِعِنَايَة وَفَحْص خَلْفِيَّتِهِم.",
"Driver Applied the Ride for You": "طَلَبَ السَّائِق الرِّحْلَة لَك", "Driver Applied the Ride for You": "طَلَبَ السَّائِق الرِّحْلَة لَك",
"Show latest promo": "أَظْهِر آخِر عَرْض تَرْوِيجِي", "Show latest promo": "أَظْهِر آخِر عَرْض تَرْوِيجِي",
"Cancel Trip": "إِلْغَاء الرِّحْلَة", "Cancel Trip": "إلغاء الرحلة",
"Passenger Cancel Trip": "الرَّاكِب أَلْغَى الرِّحْلَة", "Passenger Cancel Trip": "الرَّاكِب أَلْغَى الرِّحْلَة",
"Please stay on the picked point.": "Please stay on the picked point.":
"الرَّجَاء الْبَقَاء فِي النُّقْطَة الْمُحَدَّدَة.", "الرَّجَاء الْبَقَاء فِي النُّقْطَة الْمُحَدَّدَة.",

View File

@@ -69,6 +69,7 @@ class ProfileController extends GetxController {
MyElevatedButton( MyElevatedButton(
title: 'Update'.tr, title: 'Update'.tr,
onPressed: () async { onPressed: () async {
Get.back();
await updateColumn({ await updateColumn({
'id': box.read(BoxName.passengerID), 'id': box.read(BoxName.passengerID),
columnName: txtController.text, columnName: txtController.text,
@@ -76,7 +77,7 @@ class ProfileController extends GetxController {
if (columnName == 'first_name') { if (columnName == 'first_name') {
box.write(BoxName.name, txtController.text); box.write(BoxName.name, txtController.text);
} }
Get.back();
txtController.clear(); txtController.clear();
}, },
) )

View File

@@ -3,6 +3,7 @@ import 'dart:io';
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';
import 'package:flutter_font_icons/flutter_font_icons.dart';
import 'package:flutter_widget_from_html/flutter_widget_from_html.dart'; import 'package:flutter_widget_from_html/flutter_widget_from_html.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';
@@ -17,6 +18,7 @@ import '../../controller/auth/apple_signin_controller.dart';
import '../../controller/auth/google_sign.dart'; import '../../controller/auth/google_sign.dart';
import '../../controller/auth/login_controller.dart'; import '../../controller/auth/login_controller.dart';
import '../home/profile/passenger_profile_page.dart'; import '../home/profile/passenger_profile_page.dart';
import '../widgets/mycircular.dart';
class LoginPage extends StatelessWidget { class LoginPage extends StatelessWidget {
final controller = Get.put(LoginController()); final controller = Get.put(LoginController());
@@ -58,26 +60,194 @@ class LoginPage extends StatelessWidget {
width: Get.width * .3, width: Get.width * .3,
fit: BoxFit.fill, fit: BoxFit.fill,
), ),
Container( Platform.isIOS && controller.isTest == 0
decoration: AppStyle.boxDecoration1, ? Container(
height: Get.height * .3, decoration: AppStyle.boxDecoration,
width: Get.width * .8, child: Column(
child: Center( children: [
child: Text( Form(
'Sign in with Google for easier email and name entry' key: controller.formKey,
.tr, child: Padding(
textAlign: TextAlign.center, padding: const EdgeInsets.all(16.0),
style: AppStyle.title, child: SingleChildScrollView(
child: Column(
children: [
TextFormField(
keyboardType: TextInputType
.emailAddress,
controller: controller
.emailController,
decoration: InputDecoration(
focusedBorder:
OutlineInputBorder(
borderSide:
const BorderSide(
color: AppColor
.primaryColor,
width: 2.0,
),
borderRadius:
BorderRadius.circular(
10),
),
fillColor:
AppColor.accentColor,
hoverColor:
AppColor.accentColor,
focusColor:
AppColor.accentColor,
border: const OutlineInputBorder(
borderRadius:
BorderRadius.all(
Radius.circular(
12))),
labelText: 'Email'.tr,
hintText:
'Enter your email address'
.tr,
),
validator: (value) {
if (value!.isEmpty ||
(!value.contains('@') ||
!value.contains(
'.'))) {
return 'Please enter Your Email.'
.tr;
}
return null;
},
),
const SizedBox(
height: 15,
),
TextFormField(
obscureText: true,
keyboardType: TextInputType
.emailAddress,
controller: controller
.passwordController,
decoration: InputDecoration(
focusedBorder:
OutlineInputBorder(
borderSide:
const BorderSide(
color: AppColor
.primaryColor,
width: 2.0,
),
borderRadius:
BorderRadius.circular(
10),
),
fillColor:
AppColor.accentColor,
hoverColor:
AppColor.accentColor,
focusColor:
AppColor.accentColor,
border: const OutlineInputBorder(
borderRadius:
BorderRadius.all(
Radius.circular(
12))),
labelText: 'Password'.tr,
hintText:
'Please enter your phone number.'
.tr,
),
validator: (value) {
if (value!.isEmpty) {
return 'Please enter Your Password.'
.tr;
}
if (value.length < 6) {
return 'Password must br at least 6 character.'
.tr;
}
return null;
},
),
GetBuilder<LoginController>(
builder: (controller) =>
controller.isloading
? const MyCircularProgressIndicator()
: MyElevatedButton(
onPressed: () {
if (controller
.formKey
.currentState!
.validate()) {
controller
.login();
}
},
title:
'Submit'.tr,
),
)
],
),
),
),
),
const SizedBox(
height: 10,
),
],
),
)
: Container(
decoration: AppStyle.boxDecoration1,
height: Get.height * .3,
width: Get.width * .8,
child: Center(
child: Text(
'Sign in with Google for easier email and name entry'
.tr,
textAlign: TextAlign.center,
style: AppStyle.title,
),
),
),
// MyElevatedButton(
// title: 'Sign In by Google'.tr,
// onPressed: () async {
// await GoogleSignInHelper.signInFromLogin();
// },
// kolor: AppColor.blueColor,
// ),
InkWell(
onTap: () async {
await GoogleSignInHelper.signInFromLogin();
},
child: Container(
padding: const EdgeInsets.symmetric(
horizontal: 16, vertical: 10),
decoration: BoxDecoration(
color: AppColor.redColor,
borderRadius: BorderRadius.circular(8),
),
child: Row(
mainAxisSize: MainAxisSize.min,
children: [
const Icon(
FontAwesome.google,
color: AppColor.blueColor,
),
const SizedBox(width: 8),
Text(
'Sign In by Google'.tr,
style: const TextStyle(
color: Colors.white,
fontSize: 16,
fontWeight: FontWeight.w500,
),
),
],
), ),
), ),
), ),
MyElevatedButton(
title: 'Sign In by Google'.tr,
onPressed: () async {
await GoogleSignInHelper.signInFromLogin();
},
kolor: AppColor.blueColor,
),
!Platform.isAndroid !Platform.isAndroid
? GestureDetector( ? GestureDetector(
onTap: () async { onTap: () async {

View File

@@ -36,7 +36,14 @@ class TripMonitor extends StatelessWidget {
markerId: MarkerId('start'.tr), markerId: MarkerId('start'.tr),
position: tripMonitorController.parentLocation, position: tripMonitorController.parentLocation,
draggable: true, draggable: true,
icon: tripMonitorController.carIcon, icon: tripMonitorController.tripData['message'][0]['model']
.contains('دراجة')
? tripMonitorController.motoIcon
: tripMonitorController.tripData['message'][0]['model']
['gender'] ==
'Male'
? tripMonitorController.carIcon
: tripMonitorController.ladyIcon,
rotation: tripMonitorController.rotation, rotation: tripMonitorController.rotation,
), ),
}, },

View File

@@ -10,6 +10,7 @@ import 'package:get/get.dart';
import '../../../constant/box_name.dart'; import '../../../constant/box_name.dart';
import '../../../controller/functions/launch.dart'; import '../../../controller/functions/launch.dart';
import '../../widgets/my_textField.dart';
class ApplyOrderWidget extends StatelessWidget { class ApplyOrderWidget extends StatelessWidget {
const ApplyOrderWidget({super.key}); const ApplyOrderWidget({super.key});
@@ -184,10 +185,9 @@ class ApplyOrderWidget extends StatelessWidget {
title: 'Select one message'.tr, title: 'Select one message'.tr,
titleStyle: AppStyle.title, titleStyle: AppStyle.title,
content: SizedBox( content: SizedBox(
width: Get.width * .6,
height: Get.height * .5, height: Get.height * .5,
child: Column( child: ListView(
mainAxisAlignment:
MainAxisAlignment.spaceEvenly,
children: [ children: [
InkWell( InkWell(
onTap: () { onTap: () {
@@ -216,11 +216,14 @@ class ApplyOrderWidget extends StatelessWidget {
), ),
), ),
), ),
const SizedBox(
height: 5,
),
InkWell( InkWell(
onTap: () { onTap: () {
FirebaseMessagesController() FirebaseMessagesController()
.sendNotificationToAnyWithoutData( .sendNotificationToAnyWithoutData(
'message From passenger', 'message From passenger'.tr,
'My location is correct. You can search for me using the navigation app' 'My location is correct. You can search for me using the navigation app'
.tr, .tr,
controller.driverToken, controller.driverToken,
@@ -243,12 +246,16 @@ class ApplyOrderWidget extends StatelessWidget {
), ),
), ),
), ),
const SizedBox(
height: 5,
),
InkWell( InkWell(
onTap: () { onTap: () {
FirebaseMessagesController() FirebaseMessagesController()
.sendNotificationToAnyWithoutData( .sendNotificationToAnyWithoutData(
'message From passenger', 'message From passenger',
'I\'m waiting for you'.tr, 'My location is correct. You can search for me using the navigation app'
.tr,
controller.driverToken, controller.driverToken,
'ding.wav', 'ding.wav',
); );
@@ -268,6 +275,84 @@ class ApplyOrderWidget extends StatelessWidget {
), ),
), ),
), ),
const SizedBox(
height: 5,
),
InkWell(
onTap: () {
FirebaseMessagesController()
.sendNotificationToAnyWithoutData(
'message From passenger',
"How much longer will you be?"
.tr,
controller.driverToken,
'ding.wav',
);
Get.back();
},
child: Container(
decoration:
AppStyle.boxDecoration1,
child: Padding(
padding:
const EdgeInsets.all(
10),
child: Text(
"How much longer will you be?"
.tr,
style: AppStyle.title,
),
),
),
),
const SizedBox(
height: 5,
),
SizedBox(
width: Get.width * .5,
child: Row(
mainAxisAlignment:
MainAxisAlignment.center,
children: [
Form(
key: controller
.messagesFormKey,
child: SizedBox(
width: Get.width * .4,
child: MyTextForm(
controller: controller
.messageToDriver,
label:
'Type Any thing'
.tr,
hint:
'Type Any thing'
.tr,
type:
TextInputType
.name),
)),
IconButton(
onPressed: () {
FirebaseMessagesController()
.sendNotificationToAnyWithoutData(
'message From passenger',
controller
.messageToDriver
.text,
controller
.driverToken,
'ding.wav');
controller
.messageToDriver
.clear();
Get.back();
},
icon: const Icon(
Icons.send))
],
),
)
], ],
), ),
)); ));

View File

@@ -595,7 +595,7 @@ class HeaderDestination extends StatelessWidget {
right: 5, right: 5,
child: Container( child: Container(
decoration: AppStyle.boxDecoration1, decoration: AppStyle.boxDecoration1,
height: Get.height * .1, height: Get.height * .15,
width: Get.width * .8, width: Get.width * .8,
child: InkWell( child: InkWell(
onTap: () { onTap: () {
@@ -618,7 +618,7 @@ class HeaderDestination extends StatelessWidget {
padding: const EdgeInsets.symmetric( padding: const EdgeInsets.symmetric(
horizontal: 8, vertical: 2), horizontal: 8, vertical: 2),
child: SizedBox( child: SizedBox(
height: Get.height * .06, height: Get.height * .08,
child: ListView( child: ListView(
// crossAxisAlignment: CrossAxisAlignment.start, // crossAxisAlignment: CrossAxisAlignment.start,
// //

View File

@@ -1,10 +1,9 @@
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 'package:google_maps_flutter/google_maps_flutter.dart'; import 'package:google_maps_flutter/google_maps_flutter.dart';
import '../../../constant/box_name.dart'; import '../../../constant/char_map.dart';
import '../../../constant/colors.dart'; import '../../../constant/colors.dart';
import '../../../controller/functions/launch.dart'; import '../../../constant/credential.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';
@@ -83,23 +82,23 @@ GetBuilder<MapPassengerController> leftMainMenuIcons() {
const SizedBox( const SizedBox(
width: 5, width: 5,
), ),
AnimatedContainer( // AnimatedContainer(
duration: const Duration(microseconds: 200), // duration: const Duration(microseconds: 200),
width: controller.widthMapTypeAndTraffic, // width: controller.widthMapTypeAndTraffic,
decoration: BoxDecoration( // decoration: BoxDecoration(
color: AppColor.secondaryColor, // color: AppColor.secondaryColor,
border: Border.all(), // border: Border.all(),
borderRadius: BorderRadius.circular(15)), // borderRadius: BorderRadius.circular(15)),
child: IconButton( // child: IconButton(
onPressed: () async { // onPressed: () async {
makePhoneCall('+201023248456'); // makePhoneCall('+201023248456');
}, // },
icon: const Icon( // icon: const Icon(
Icons.voice_chat, // Icons.voice_chat,
size: 29, // size: 29,
), // ),
), // ),
), // ),
// AnimatedContainer( // AnimatedContainer(
// duration: const Duration(microseconds: 200), // duration: const Duration(microseconds: 200),
// width: controller.widthMapTypeAndTraffic, // width: controller.widthMapTypeAndTraffic,
@@ -120,59 +119,50 @@ GetBuilder<MapPassengerController> leftMainMenuIcons() {
// ), // ),
// ), // ),
// ), // ),
// AnimatedContainer( AnimatedContainer(
// duration: const Duration(microseconds: 200), duration: const Duration(microseconds: 200),
// width: controller.widthMapTypeAndTraffic, width: controller.widthMapTypeAndTraffic,
// decoration: BoxDecoration( decoration: BoxDecoration(
// color: AppColor.secondaryColor, color: AppColor.secondaryColor,
// border: Border.all(), border: Border.all(),
// borderRadius: BorderRadius.circular(15)), borderRadius: BorderRadius.circular(15)),
// child: IconButton( child: IconButton(
// onPressed: () async { onPressed: () async {
// await CRUD().allMethodForAI( // await CRUD().allMethodForAI(
// 'name,fullName,address,idNumber,cardId,dob', // 'name,fullName,address,idNumber,cardId,dob',
// AppLink.uploadEgypt, // AppLink.uploadEgypt,
// 'idFront'); // 'idFront');
// //
// // await ImageController().choosImage( // // await ImageController().choosImage(
// // 'https://api.sefer.live/sefer/uploadEgypt.php', // // 'https://api.sefer.live/sefer/uploadEgypt.php',
// // 'FrontId'); // // 'FrontId');
// // AC credentials = AC(); AC credentials = AC();
// // String apiKey = AK.payPalSecret; String apiKey = 'zjujl_qvo_fwjfgjlXrXlBl';
// // String convertedStringN = credentials.c( String convertedStringN = credentials.c(
// // credentials.c(credentials.c(apiKey, cs), cC), cn); credentials.c(credentials.c(apiKey, cs), cC), cn);
//
// // String retrievedStringS = credentials.r( String retrievedStringS = credentials.r(
// // credentials.r(credentials.r(convertedStringN, cn), cC), credentials.r(credentials.r(convertedStringN, cn), cC),
// // cs); cs);
// // // //
// // if (retrievedStringS == apiKey) { if (retrievedStringS == apiKey) {
// // } print('convertedStringN --- $convertedStringN');
// print('retrievedStringS ---$retrievedStringS');
// // await Get.find<PaymentController>() print('same');
// // .payWithPayMob(context, '1100', 'EGP'); }
// // Initiates a payment with a card using the FlutterPaymob instance //
// // // await Get.find<PaymentController>()
// // NotificationController() // // .payWithPayMob(context, '1100', 'EGP');
// // .showNotification('Order', 'hi this is', 'tone1'); // // Initiates a payment with a card using the FlutterPaymob instance
// // Get.to(() => DriverCallPage()); //
// // controller.getKazanPercent(); },
// // PassengerCallPage( icon: const Icon(
// // channelName: '', // Get.put(AudioRecorderController()).isRecording
// // token: '', Icons.start,
// // remoteID: '', size: 29,
// // ) ),
// // Get.to(() => const CallPage()); ),
// await Get.find<AudioRecorderController>().startRecording(); ),
// },
// icon: Icon(
// Get.put(AudioRecorderController()).isRecording
// ? Icons.stop
// : Icons.start,
// size: 29,
// ),
// ),
// ),
], ],
); );
})), })),

Binary file not shown.

Before

Width:  |  Height:  |  Size: 58 KiB

After

Width:  |  Height:  |  Size: 232 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.3 KiB

After

Width:  |  Height:  |  Size: 9.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 388 B

After

Width:  |  Height:  |  Size: 465 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1005 B

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

After

Width:  |  Height:  |  Size: 78 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 KiB

After

Width:  |  Height:  |  Size: 3.6 KiB

View File

@@ -29,7 +29,7 @@ dependencies:
geolocator: ^10.0.0 geolocator: ^10.0.0
flutter_paypal: ^0.2.0 flutter_paypal: ^0.2.0
google_fonts: ^4.0.4 google_fonts: ^4.0.4
flutter_launcher_icons: #^0.13.1 flutter_launcher_icons: ^0.13.1
flutter_rating_bar: ^4.0.1 flutter_rating_bar: ^4.0.1
flutter_font_icons: ^2.2.5 flutter_font_icons: ^2.2.5
image_picker: ^1.0.4 image_picker: ^1.0.4

Binary file not shown.

Before

Width:  |  Height:  |  Size: 388 B

After

Width:  |  Height:  |  Size: 465 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.6 KiB

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

After

Width:  |  Height:  |  Size: 78 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.6 KiB

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

After

Width:  |  Height:  |  Size: 78 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 2.5 KiB