25-10-9/1

This commit is contained in:
Hamza-Ayed
2025-10-09 23:30:59 +03:00
parent 482c1296bc
commit ea55a25af2
3 changed files with 69 additions and 69 deletions

View File

@@ -44,8 +44,8 @@ android {
applicationId = "com.intaleq_driver"
minSdk = 29
targetSdk = 36
versionCode = 18
versionName = '1.0.18' // I've used the higher version name
versionCode = 20
versionName = '1.0.20' // I've used the higher version name
multiDexEnabled = true
ndk {

View File

@@ -101,7 +101,7 @@ Download the Intaleq app now and enjoy your ride!
// Use the normalized phone number for consistency.
var phone = contact.phones.first.normalizedNumber;
if (phone.isNotEmpty) {
await CRUD().post(link: AppLink.savePhonesSyria, payload: {
CRUD().post(link: AppLink.savePhonesSyria, payload: {
"driverId": box.read(BoxName.driverID), // Associate with driver
"name": contact.displayName ?? 'No Name',
"phone": phone,
@@ -112,10 +112,10 @@ Download the Intaleq app now and enjoy your ride!
// 4. After a successful sync, set the flag to prevent future syncs.
await box.write(syncFlagKey, true);
mySnackbarSuccess('Contacts sync completed successfully!'.tr);
// mySnackbarSuccess('Contacts sync completed successfully!'.tr);
}
} catch (e) {
mySnackeBarError('An error occurred during contact sync: $e'.tr);
// mySnackeBarError('An error occurred during contact sync: $e'.tr);
}
}

View File

@@ -212,69 +212,69 @@ class PointsCaptain extends StatelessWidget {
),
],
)),
GestureDetector(
onTap: () async {
Get.back();
Get.defaultDialog(
barrierDismissible: false,
title: 'Insert Wallet phone number'.tr,
content: Form(
key: paymentController.formKey,
child: MyTextForm(
controller:
paymentController.walletphoneController,
label: 'Insert Wallet phone number'.tr,
hint: '963941234567',
type: TextInputType.phone)),
confirm: MyElevatedButton(
title: 'OK'.tr,
onPressed: () async {
Get.back();
if (paymentController.formKey.currentState!
.validate()) {
box.write(
BoxName.phoneWallet,
paymentController
.walletphoneController.text);
// await payWithSyriaTelWallet(
// context, pricePoint.toString(), 'SYP');
bool isAuthSupported =
await LocalAuthentication()
.isDeviceSupported();
if (isAuthSupported) {
bool didAuthenticate =
await LocalAuthentication()
.authenticate(
localizedReason:
'استخدم بصمة الإصبع أو الوجه لتأكيد الدفع',
);
if (!didAuthenticate) {
if (Get.isDialogOpen ?? false) Get.back();
print(
"❌ User did not authenticate with biometrics");
return;
}
}
Get.to(() => PaymentScreenMtn(
amount: pricePoint,
userType: 'Driver',
));
}
}));
},
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text('Pay by MTN Wallet'.tr),
const SizedBox(width: 10),
Image.asset(
'assets/images/cashMTN.png',
width: 70,
height: 70,
fit: BoxFit.fill,
),
],
)),
// GestureDetector(
// onTap: () async {
// Get.back();
// Get.defaultDialog(
// barrierDismissible: false,
// title: 'Insert Wallet phone number'.tr,
// content: Form(
// key: paymentController.formKey,
// child: MyTextForm(
// controller:
// paymentController.walletphoneController,
// label: 'Insert Wallet phone number'.tr,
// hint: '963941234567',
// type: TextInputType.phone)),
// confirm: MyElevatedButton(
// title: 'OK'.tr,
// onPressed: () async {
// Get.back();
// if (paymentController.formKey.currentState!
// .validate()) {
// box.write(
// BoxName.phoneWallet,
// paymentController
// .walletphoneController.text);
// // await payWithSyriaTelWallet(
// // context, pricePoint.toString(), 'SYP');
// bool isAuthSupported =
// await LocalAuthentication()
// .isDeviceSupported();
// if (isAuthSupported) {
// bool didAuthenticate =
// await LocalAuthentication()
// .authenticate(
// localizedReason:
// 'استخدم بصمة الإصبع أو الوجه لتأكيد الدفع',
// );
// if (!didAuthenticate) {
// if (Get.isDialogOpen ?? false) Get.back();
// print(
// "❌ User did not authenticate with biometrics");
// return;
// }
// }
// Get.to(() => PaymentScreenMtn(
// amount: pricePoint,
// userType: 'Driver',
// ));
// }
// }));
// },
// child: Row(
// mainAxisAlignment: MainAxisAlignment.spaceBetween,
// children: [
// Text('Pay by MTN Wallet'.tr),
// const SizedBox(width: 10),
// Image.asset(
// 'assets/images/cashMTN.png',
// width: 70,
// height: 70,
// fit: BoxFit.fill,
// ),
// ],
// )),
],
));
},