25-1/13/1-securejordan
This commit is contained in:
@@ -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(
|
||||
|
||||
@@ -8,6 +8,7 @@ import 'package:get/get.dart';
|
||||
import 'package:sefer_driver/controller/home/captin/home_captain_controller.dart';
|
||||
|
||||
import '../../../../../constant/colors.dart';
|
||||
import '../../../../../controller/functions/encrypt_decrypt.dart';
|
||||
import '../../../../Rate/ride_calculate_driver.dart';
|
||||
|
||||
GetBuilder<HomeCaptainController> leftMainMenuCaptainIcons() {
|
||||
@@ -90,26 +91,38 @@ GetBuilder<HomeCaptainController> leftMainMenuCaptainIcons() {
|
||||
)
|
||||
: const SizedBox(),
|
||||
// : const SizedBox(),
|
||||
// AnimatedContainer(
|
||||
// duration: const Duration(microseconds: 200),
|
||||
// width: controller.widthMapTypeAndTraffic,
|
||||
// decoration: BoxDecoration(
|
||||
// color: AppColor.secondaryColor,
|
||||
// border: Border.all(color: AppColor.blueColor),
|
||||
// borderRadius: BorderRadius.circular(15)),
|
||||
// child: Builder(builder: (context) {
|
||||
// return IconButton(
|
||||
// onPressed: () async {
|
||||
// MyCircularProgressIndicator();
|
||||
// },
|
||||
// icon: const Icon(
|
||||
// FontAwesome5.grin_tears,
|
||||
// size: 29,
|
||||
// color: AppColor.blueColor,
|
||||
// ),
|
||||
// );
|
||||
// }),
|
||||
// ),
|
||||
AnimatedContainer(
|
||||
duration: const Duration(microseconds: 200),
|
||||
width: controller.widthMapTypeAndTraffic,
|
||||
decoration: BoxDecoration(
|
||||
color: AppColor.secondaryColor,
|
||||
border: Border.all(color: AppColor.blueColor),
|
||||
borderRadius: BorderRadius.circular(15)),
|
||||
child: Builder(builder: (context) {
|
||||
return IconButton(
|
||||
onPressed: () async {
|
||||
final plainText = 'Al-sayyd';
|
||||
debugPrint('Plain Text: $plainText');
|
||||
|
||||
// Encrypt the data
|
||||
final encryptedData = encryptionHelper.encryptData(plainText);
|
||||
debugPrint('Encrypted: $encryptedData');
|
||||
|
||||
// Decrypt the data
|
||||
final decryptedData = encryptionHelper.decryptData(
|
||||
encryptedData); // Use the encryptedData variable
|
||||
debugPrint('Decrypted: $decryptedData');
|
||||
// rlyouFVUqI7TEhu9UEMangaIViglSgxLk3/d1c0Yo7g=
|
||||
// rlyouFVUqI7TEhu9UEMangaIViglSgxLk3/d1c0Yo7g=
|
||||
},
|
||||
icon: const Icon(
|
||||
FontAwesome5.grin_tears,
|
||||
size: 29,
|
||||
color: AppColor.blueColor,
|
||||
),
|
||||
);
|
||||
}),
|
||||
),
|
||||
|
||||
const SizedBox(
|
||||
height: 5,
|
||||
|
||||
Reference in New Issue
Block a user