This commit is contained in:
Hamza Aleghwairyeen
2024-04-26 18:23:45 +03:00
parent a9c570cab7
commit dcf02cc36d
22 changed files with 600 additions and 344 deletions

View File

@@ -1,11 +1,14 @@
import 'package:SEFER/constant/style.dart';
import 'package:SEFER/controller/functions/crud.dart';
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:google_maps_flutter/google_maps_flutter.dart';
import 'package:path/path.dart' as path;
import '../../../constant/colors.dart';
import '../../../constant/links.dart';
import '../../../controller/functions/audio_record1.dart';
import '../../../controller/functions/tts.dart';
import '../../../controller/functions/upload_image.dart';
import '../../../controller/home/map_passenger_controller.dart';
GetBuilder<MapPassengerController> leftMainMenuIcons() {
@@ -83,77 +86,85 @@ GetBuilder<MapPassengerController> leftMainMenuIcons() {
const SizedBox(
height: 5,
),
AnimatedContainer(
duration: const Duration(microseconds: 200),
width: controller.widthMapTypeAndTraffic,
decoration: BoxDecoration(
color: AppColor.secondaryColor,
border: Border.all(),
borderRadius: BorderRadius.circular(15)),
child: IconButton(
onPressed: () async {
await Get.find<AudioRecorderController>().stopRecording();
},
icon: const Icon(
Icons.voice_chat,
size: 29,
),
),
),
AnimatedContainer(
duration: const Duration(microseconds: 200),
width: controller.widthMapTypeAndTraffic,
decoration: BoxDecoration(
color: AppColor.secondaryColor,
border: Border.all(),
borderRadius: BorderRadius.circular(15)),
child: IconButton(
onPressed: () async {
// AC credentials = AC();
// String apiKey = AK.payPalSecret;
// String convertedStringN = credentials.c(
// credentials.c(credentials.c(apiKey, cs), cC), cn);
// print('Converted v: $convertedStringN');
// String retrievedStringS = credentials.r(
// credentials.r(credentials.r(convertedStringN, cn), cC),
// cs);
// print('Retrieved String: $retrievedStringS');
// //
// if (retrievedStringS == apiKey) {
// print('same');
// }
// print(box.read(BoxName.passengerWalletTotal));
// print(box.read(BoxName.name));
// print(box.read(BoxName.phone));
// print(box.read(BoxName.email));
// await Get.find<PaymentController>()
// .payWithPayMob(context, '1100', 'EGP');
// Initiates a payment with a card using the FlutterPaymob instance
// NotificationController()
// .showNotification('Order', 'hi this is', 'tone1');
// Get.to(() => DriverCallPage());
// print(controller.carLocationsModels);
// controller.getKazanPercent();
// PassengerCallPage(
// channelName: '',
// token: '',
// remoteID: '',
// )
// Get.to(() => const CallPage());
// print(box.read(BoxName.lang));
await Get.find<AudioRecorderController>().startRecording();
},
icon: Icon(
Get.put(AudioRecorderController()).isRecording
? Icons.stop
: Icons.start,
size: 29,
),
),
),
// AnimatedContainer(
// duration: const Duration(microseconds: 200),
// width: controller.widthMapTypeAndTraffic,
// decoration: BoxDecoration(
// color: AppColor.secondaryColor,
// border: Border.all(),
// borderRadius: BorderRadius.circular(15)),
// child: IconButton(
// onPressed: () async {
// await Get.find<AudioRecorderController>().stopRecording();
// },
// icon: const Icon(
// Icons.voice_chat,
// size: 29,
// ),
// ),
// ),
// AnimatedContainer(
// duration: const Duration(microseconds: 200),
// width: controller.widthMapTypeAndTraffic,
// decoration: BoxDecoration(
// color: AppColor.secondaryColor,
// border: Border.all(),
// borderRadius: BorderRadius.circular(15)),
// child: IconButton(
// onPressed: () async {
// await CRUD().allMethodForAI(
// 'name,fullName,address,idNumber,cardId,dob',
// AppLink.uploadEgypt,
// 'idFront');
//
// // await ImageController().choosImage(
// // 'https://api.sefer.live/sefer/uploadEgypt.php',
// // 'FrontId');
// // AC credentials = AC();
// // String apiKey = AK.payPalSecret;
// // String convertedStringN = credentials.c(
// // credentials.c(credentials.c(apiKey, cs), cC), cn);
// // print('Converted v: $convertedStringN');
//
// // String retrievedStringS = credentials.r(
// // credentials.r(credentials.r(convertedStringN, cn), cC),
// // cs);
// // print('Retrieved String: $retrievedStringS');
// // //
// // if (retrievedStringS == apiKey) {
// // print('same');
// // }
//
// // print(box.read(BoxName.passengerWalletTotal));
// // print(box.read(BoxName.name));
// // print(box.read(BoxName.phone));
// // print(box.read(BoxName.email));
// // await Get.find<PaymentController>()
// // .payWithPayMob(context, '1100', 'EGP');
// // Initiates a payment with a card using the FlutterPaymob instance
//
// // NotificationController()
// // .showNotification('Order', 'hi this is', 'tone1');
// // Get.to(() => DriverCallPage());
// // print(controller.carLocationsModels);
// // controller.getKazanPercent();
// // PassengerCallPage(
// // channelName: '',
// // token: '',
// // remoteID: '',
// // )
// // Get.to(() => const CallPage());
// // print(box.read(BoxName.lang));
// await Get.find<AudioRecorderController>().startRecording();
// },
// icon: Icon(
// Get.put(AudioRecorderController()).isRecording
// ? Icons.stop
// : Icons.start,
// size: 29,
// ),
// ),
// ),
],
);
})),