25-1/28/1
This commit is contained in:
@@ -4,6 +4,7 @@ import 'package:sefer_driver/constant/box_name.dart';
|
||||
import 'package:sefer_driver/controller/firebase/local_notification.dart';
|
||||
import 'package:sefer_driver/controller/functions/crud.dart';
|
||||
import 'package:sefer_driver/main.dart';
|
||||
import 'package:sefer_driver/views/auth/captin/cards/sms_signup.dart';
|
||||
import 'package:sefer_driver/views/home/Captin/orderCaptin/vip_order_page.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_font_icons/flutter_font_icons.dart';
|
||||
@@ -95,107 +96,26 @@ 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 {
|
||||
// final plainText =
|
||||
// 'https://server.sefer.live/sefer.click/sefer';
|
||||
// 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');
|
||||
// box.remove('DriversSecure');
|
||||
var drivers0 = await CRUD().post(
|
||||
link:
|
||||
'https://server.sefer.live/sefer.click/sefer/auth/captin/getAllDriverSecure.php',
|
||||
payload: {});
|
||||
var decodedDriver;
|
||||
if (drivers0 != 'failure') {
|
||||
decodedDriver = jsonDecode(drivers0);
|
||||
|
||||
// box.write('DriversSecure', decodedDriver['message']);
|
||||
}
|
||||
var drivers = decodedDriver['message'];
|
||||
Log.print('drivers.length: ${drivers.length}');
|
||||
for (var i = 0; i < drivers.length; i++) {
|
||||
Log.print('drivers: ${drivers[i]['id']}');
|
||||
var payload = {
|
||||
"phone": encryptionHelper
|
||||
.encryptData(drivers[i]['phone'].toString()),
|
||||
"email": encryptionHelper
|
||||
.encryptData(drivers[i]['email'].toString()),
|
||||
"gender": encryptionHelper
|
||||
.encryptData(drivers[i]['gender'].toString()),
|
||||
"license_type": encryptionHelper
|
||||
.encryptData(drivers[i]['license_type'].toString()),
|
||||
"national_number": encryptionHelper.encryptData(
|
||||
drivers[i]['national_number'].toString()),
|
||||
"name_arabic": encryptionHelper
|
||||
.encryptData(drivers[i]['name_arabic'].toString()),
|
||||
"name_english": encryptionHelper
|
||||
.encryptData(drivers[i]['name_english'].toString()),
|
||||
"address": encryptionHelper
|
||||
.encryptData(drivers[i]['address'].toString()),
|
||||
"card_id": encryptionHelper
|
||||
.encryptData(drivers[i]['card_id'].toString()),
|
||||
"occupation": encryptionHelper
|
||||
.encryptData(drivers[i]['occupation'].toString()),
|
||||
"religion": encryptionHelper
|
||||
.encryptData(drivers[i]['religion'].toString()),
|
||||
"birthdate": encryptionHelper
|
||||
.encryptData(drivers[i]['birthdate'].toString()),
|
||||
"site": encryptionHelper
|
||||
.encryptData(drivers[i]['site'].toString()),
|
||||
"first_name": encryptionHelper
|
||||
.encryptData(drivers[i]['first_name'].toString()),
|
||||
"last_name": encryptionHelper
|
||||
.encryptData(drivers[i]['last_name'].toString()),
|
||||
"education": encryptionHelper
|
||||
.encryptData(drivers[i]['education'].toString()),
|
||||
"employmentType": encryptionHelper
|
||||
.encryptData(drivers[i]['employmentType'].toString()),
|
||||
"maritalStatus": (drivers[i]['maritalStatus'].toString()),
|
||||
"fullNameMaritial": encryptionHelper.encryptData(
|
||||
drivers[i]['fullNameMaritial'].toString()),
|
||||
'id': drivers[i]['id'].toString()
|
||||
};
|
||||
print(payload);
|
||||
// if (drivers[i]['id'].toString() !=
|
||||
// '01002165502a9sHC1tbrUrUw') {
|
||||
var result = await CRUD().post(
|
||||
link:
|
||||
'https://server.sefer.live/sefer.click/sefer/auth/captin/updateDriverSecure.php',
|
||||
payload: payload);
|
||||
if (result != 'failure') {
|
||||
print(result);
|
||||
} else {
|
||||
print('failure');
|
||||
}
|
||||
Future.delayed(Duration(microseconds: 200));
|
||||
// }
|
||||
}
|
||||
},
|
||||
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 {
|
||||
// Get.to(SmsSignupEgypt());
|
||||
// },
|
||||
// icon: const Icon(
|
||||
// FontAwesome5.grin_tears,
|
||||
// size: 29,
|
||||
// color: AppColor.blueColor,
|
||||
// ),
|
||||
// );
|
||||
// }),
|
||||
// ),
|
||||
|
||||
const SizedBox(
|
||||
height: 5,
|
||||
|
||||
@@ -301,12 +301,10 @@ class _OrderRequestPageState extends State<OrderRequestPage> {
|
||||
'https://www.google.com/maps/dir/${controller.myList[0]}/${controller.myList[1]}/',
|
||||
'DurationToPassenger':
|
||||
controller.myList[15].toString(),
|
||||
'rideId': encryptionHelper.decryptData(
|
||||
controller.myList[16].toString()),
|
||||
'passengerId': encryptionHelper.decryptData(
|
||||
controller.myList[7].toString()),
|
||||
'driverId': encryptionHelper.decryptData(
|
||||
controller.myList[18].toString()),
|
||||
'rideId': (controller.myList[16].toString()),
|
||||
'passengerId':
|
||||
(controller.myList[7].toString()),
|
||||
'driverId': (controller.myList[18].toString()),
|
||||
'durationOfRideValue':
|
||||
controller.myList[19].toString(),
|
||||
'paymentAmount':
|
||||
|
||||
Reference in New Issue
Block a user