This commit is contained in:
Hamza-Ayed
2024-07-06 19:24:10 +03:00
21 changed files with 262 additions and 275 deletions

View File

@@ -1,3 +1,5 @@
import 'package:SEFER/constant/box_name.dart';
import 'package:SEFER/controller/home/captin/map_driver_controller.dart';
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:google_maps_flutter/google_maps_flutter.dart';
@@ -14,6 +16,7 @@ import '../../../../controller/functions/package_info.dart';
import '../../../../controller/home/captin/home_captain_controller.dart';
import '../../../../controller/home/captin/order_request_controller.dart';
import '../../../widgets/circle_container.dart';
import '../driver_map_page.dart';
import 'widget/connect.dart';
import 'widget/left_menu_map_captain.dart';
import '../../../../controller/home/payment/captain_wallet_controller.dart';
@@ -237,6 +240,43 @@ class HomeCaptain extends StatelessWidget {
// ),
// ),
leftMainMenuCaptainIcons(),
box.read(BoxName.rideStatus) == 'Applied' ||
box.read(BoxName.rideStatus) == 'Begin'
? Positioned(
bottom: Get.height * .2,
right: 6,
child: AnimatedContainer(
duration: const Duration(microseconds: 200),
width: homeCaptainController.widthMapTypeAndTraffic,
decoration: BoxDecoration(
border: Border.all(color: AppColor.blueColor),
color: AppColor.secondaryColor,
borderRadius: BorderRadius.circular(15)),
child: IconButton(
onPressed: () {
box.read(BoxName.rideStatus) == 'Applied'
? {
Get.to(() => PassengerLocationMapPage(),
arguments: box.read(BoxName.rideArguments)),
Get.find<MapDriverController>()
.driverGoToPassenger()
}
: {
Get.to(() => PassengerLocationMapPage(),
arguments: box.read(BoxName.rideArguments)),
Get.find<MapDriverController>()
.changeRideToBeginToPassenger()
};
},
icon: const Icon(
Icons.rice_bowl,
size: 29,
color: AppColor.blueColor,
),
),
),
)
: SizedBox()
// callPage(),
// Positioned(

View File

@@ -1,17 +1,12 @@
import 'package:SEFER/constant/box_name.dart';
import 'package:SEFER/main.dart';
import 'package:SEFER/views/home/Captin/driver_map_page.dart';
import 'package:flutter/material.dart';
import 'package:flutter_font_icons/flutter_font_icons.dart';
import 'package:get/get.dart';
import 'package:SEFER/controller/home/captin/home_captain_controller.dart';
import 'package:google_maps_flutter/google_maps_flutter.dart';
import '../../../../../constant/char_map.dart';
import '../../../../../constant/colors.dart';
import '../../../../../constant/credential.dart';
import '../../../../../controller/functions/encrypt.dart';
import '../../../../../controller/functions/launch.dart';
import '../../../../Rate/ride_calculate_driver.dart';
import '../../../../../controller/functions/location_controller.dart';
@@ -22,55 +17,60 @@ GetBuilder<HomeCaptainController> leftMainMenuCaptainIcons() {
left: 6,
child: Column(
children: [
AnimatedContainer(
duration: const Duration(microseconds: 200),
width: controller.widthMapTypeAndTraffic,
decoration: BoxDecoration(
border: Border.all(color: AppColor.blueColor),
color: AppColor.secondaryColor,
borderRadius: BorderRadius.circular(15)),
child: IconButton(
onPressed: () {
// AC credentials = AC();
String apiKey = 'maldev@2101hamzaayedseferegyptjo';
// String convertedStringN = credentials.c(
// credentials.c(credentials.c(apiKey, cs), cC), cn);
// print(convertedStringN);
// String retrievedStringS = credentials.r(
// credentials.r(credentials.r(convertedStringN, cn), cC),
// cs);
// print(retrievedStringS);
// //
// if (retrievedStringS == apiKey) {
// print('same');
// }
// AnimatedContainer(
// duration: const Duration(microseconds: 200),
// width: controller.widthMapTypeAndTraffic,
// decoration: BoxDecoration(
// border: Border.all(color: AppColor.blueColor),
// color: AppColor.secondaryColor,
// borderRadius: BorderRadius.circular(15)),
// child: IconButton(
// onPressed: () {
// // AC credentials = AC();
//
// // String apikey = AK.passwordPayMob;
// // String convertedStringN = credentials.c(
// // credentials.c(credentials.c(apikey, cs), cC), cn);
// // print(convertedStringN);
// // String retrievedStringS = credentials.r(
// // credentials.r(credentials.r(convertedStringN, cn), cC),
// // cs);
// // print(retrievedStringS);
// // //
// // if (retrievedStringS ==
// // 'apikey') {
// // print('same');
// // }
// key.forEach((key, apiKey) {
// // key.forEach((key, apiKey) {
// // Get.to(() => SmsSignupEgypt());
// // keys.forEach((key, apiKey) {
// // String retrievedStringS = credentials.r(
// // credentials.r(credentials.r(apiKey, cn), cC), cs);
// // String encryptedApiKey =
// // KeyEncryption.encryptKey(retrievedStringS);
// // print('$key=$encryptedApiKey');
// keys.forEach((key, apiKey) {
String encryptedApiKey = KeyEncryption.encryptKey(apiKey);
print('Encrypted API Key for : $encryptedApiKey');
// // String decryptedApiKey =
// // KeyEncryption.decryptKey(encryptedApiKey);
// // print('Decrypted API Key for : $decryptedApiKey');
String decryptedApiKey = KeyEncryption.decryptKey(
"Hsd7tLdt4ZsSRMCCs0xia2ct9O1jrJKyZu6pvh6MjL8qg6TkJ9FZCW4H/OqCkMjtokBOTdTX0P2sASLTcTxBVA==");
print('Decrypted API Key for : $decryptedApiKey');
if (decryptedApiKey == apiKey) {
print('Keys match for ');
} else {
print('Keys do not match for ');
}
// });
},
icon: const Icon(
FontAwesome.map_signs,
size: 24,
color: Colors.black,
)),
),
const SizedBox(
height: 5,
),
// // if (decryptedApiKey == apiKey) {
// // print('Keys match for ');
// // } else {
// // print('Keys do not match for ');
// // }
// // });
// },
// icon: const Icon(
// FontAwesome.map_signs,
// size: 24,
// color: Colors.black,
// )),
// ),
// const SizedBox(
// height: 5,
// ),
AnimatedContainer(
duration: const Duration(microseconds: 200),
width: controller.widthMapTypeAndTraffic,

View File

@@ -223,8 +223,7 @@ class PassengerInfoWindow extends StatelessWidget {
height: 5,
),
SizedBox(
width: Get.width *
.5,
width: 200,
child: Row(
mainAxisAlignment:
MainAxisAlignment
@@ -235,8 +234,8 @@ class PassengerInfoWindow extends StatelessWidget {
.formKey2,
child:
SizedBox(
width: Get.width *
.4,
width:
160,
child: MyTextForm(
controller:
controller.messageToPassenger,
@@ -248,7 +247,7 @@ class PassengerInfoWindow extends StatelessWidget {
onPressed:
() {
FirebaseMessagesController().sendNotificationToAnyWithoutData(
'message From Driver',
'message From Driver'.tr,
controller.messageToPassenger.text,
controller.tokenPassenger,
'ding.wav');
@@ -413,7 +412,7 @@ class PassengerInfoWindow extends StatelessWidget {
titleStyle:
AppStyle.title,
middleText:
'don\'t start trip if not '
"don't start trip if not"
.tr,
middleTextStyle:
AppStyle.title,