25-1/13/1-securejordan

This commit is contained in:
Hamza-Ayed
2025-01-13 22:10:47 +03:00
parent e8c3f8f339
commit a893e49282
36 changed files with 803 additions and 447 deletions

View File

@@ -5,6 +5,7 @@ import 'package:get/get.dart';
import 'package:sefer_driver/controller/home/payment/captain_wallet_controller.dart';
import '../../../../../constant/style.dart';
import '../../../../../controller/functions/encrypt_decrypt.dart';
import '../../../../widgets/elevated_btn.dart';
import '../../../../../controller/home/captin/home_captain_controller.dart';
@@ -23,26 +24,27 @@ class ConnectWidget extends StatelessWidget {
captainWalletController.getCaptainWalletFromBuyPoints();
return Center(
child: GetBuilder<HomeCaptainController>(
builder: (homeCaptainController) => double.parse(
captainWalletController.totalPoints) <
builder: (homeCaptainController) => double.parse(encryptionHelper
.decryptData(captainWalletController.totalPoints)) <
-300
? CupertinoButton(
onPressed: () {
Get.defaultDialog(
// backgroundColor: CupertinoColors.destructiveRed,
barrierDismissible: false,
title:
double.parse(captainWalletController.totalPoints) <
-300
? 'You dont have Points'.tr
: 'You Are Stopped For this Day !'.tr,
title: double.parse(encryptionHelper.decryptData(
captainWalletController.totalPoints)) <
-300
? 'You dont have Points'.tr
: 'You Are Stopped For this Day !'.tr,
titleStyle: AppStyle.title,
content: Column(
children: [
IconButton(
onPressed: () async {
double.parse(captainWalletController
.totalPoints) <
double.parse(encryptionHelper.decryptData(
captainWalletController
.totalPoints)) <
-300
? await Get.find<TextToSpeechController>()
.speakText(
@@ -56,8 +58,9 @@ class ConnectWidget extends StatelessWidget {
icon: const Icon(Icons.headphones),
),
Text(
double.parse(
captainWalletController.totalPoints) <
double.parse(encryptionHelper.decryptData(
captainWalletController
.totalPoints)) <
-300
? 'You must be recharge your Account'.tr
: 'You Refused 3 Rides this Day that is the reason \nSee you Tomorrow!'
@@ -66,21 +69,20 @@ class ConnectWidget extends StatelessWidget {
),
],
),
confirm:
double.parse(captainWalletController.totalPoints) <
-300
? MyElevatedButton(
title: 'Recharge my Account'.tr,
onPressed: () {
homeCaptainController
.goToWalletFromConnect();
})
: MyElevatedButton(
title: 'Ok , See you Tomorrow'.tr,
onPressed: () {
Get.back();
Get.back();
}));
confirm: double.parse(encryptionHelper.decryptData(
captainWalletController.totalPoints)) <
-300
? MyElevatedButton(
title: 'Recharge my Account'.tr,
onPressed: () {
homeCaptainController.goToWalletFromConnect();
})
: MyElevatedButton(
title: 'Ok , See you Tomorrow'.tr,
onPressed: () {
Get.back();
Get.back();
}));
},
color: CupertinoColors.destructiveRed,
child: Text(