This commit is contained in:
Hamza-Ayed
2024-10-02 23:47:52 +03:00
parent 6f95dafd0b
commit 79b14ab9cc
9 changed files with 298 additions and 291 deletions

View File

@@ -4,6 +4,7 @@ import 'package:SEFER/main.dart';
import 'package:SEFER/views/auth/captin/cards/egypt_card_a_i.dart';
import 'package:SEFER/views/auth/captin/cards/sms_signup.dart';
import 'package:SEFER/views/auth/captin/login_captin.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:bubble_head/bubble.dart';
@@ -143,7 +144,7 @@ GetBuilder<HomeCaptainController> leftMainMenuCaptainIcons() {
borderRadius: BorderRadius.circular(15)),
child: IconButton(
onPressed: () {
NotificationController()
NotificationController1()
.showNotification('Sefer Driver'.tr, ''.tr, '', '');
final now = DateTime.now();
DateTime? lastRequestTime =
@@ -177,95 +178,95 @@ GetBuilder<HomeCaptainController> leftMainMenuCaptainIcons() {
),
),
),
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(() => EgyptCardAI());
// print(box.read(BoxName.myList));
// 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(() => EgyptCardAI());
// // print(box.read(BoxName.myList));
List<String> d = [
"30.003028,31.2419628",
"30.0955661,31.2665336",
"160.00",
"25.92",
"1488",
"16.93",
"114243034311436865474",
"113172279072358305645",
"hamza ayed",
"rlMbi4Hc8L1STMPE99iPKqK4Gddwv8r9qZOCadsz9qTEJZ6KLEE9ruTJI6N8dKfK4CXez5pme5WIs14-1QGo29s07fQOniZgIlJV5XFL3yqzPRSUmn3",
"+201023248456",
"1 min",
"1 m",
"false",
"QwUMoyUtZ0J3oR6yXKUavrB_gBl9npUZe-qZtax-Raq4QBbdKv0AmtLKm0BfBd6N_592HBv4CVa41ii4122W3hr-BCUKKzJhzZcK8m0YjbWbtpvgJRD8uD_nuMk9",
"0",
"238",
"false",
"114243034311436865474",
"1488",
"startEnd",
"30.049307749732176,31.274291574954987",
"",
"",
"",
"",
"17.73",
"0",
"hamzaayedflutter@gmail.com",
"الفسطاط، حي مصر القديمة، مصر",
" الزاوية الحمراء، محافظة القاهرة، مصر",
"Speed",
"8",
"5.00"
];
FirebaseMessagesController().sendNotificationToDriverMAP(
'Order'.tr,
'from: ',
// jsonDecode(value)['message'].toString(),
'fKBBB4_1R0q18-byySHUeG:APA91bHk2RmjjMt6eKr7KQnqh4CK02yW3H5E8g_beVcQFgiCG50j9KCtSU1O8PtvS_gA5xuJLhaorDV9AeslcyLFJFf302tICKMiKgsDP5pWkF5WXNw0-4NsoD-BnJxf0-Do9Vs1Zbpq',
d,
'order.wav');
// NotificationController()
// .showNotification('VIP Order'.tr, '', 'order', '');
// try {} catch (e) {
// print('Error showing overlay: $e');
// }
// final Bubble _bubble = Bubble(showCloseButton: true);
// try {
// await _bubble.startBubbleHead(sendAppToBackground: false);
// } on PlatformException {
// print('Failed to call startBubbleHead');
// }
// List<String> d = [
// "30.003028,31.2419628",
// "30.0955661,31.2665336",
// "160.00",
// "25.92",
// "1488",
// "16.93",
// "114243034311436865474",
// "113172279072358305645",
// "hamza ayed",
// "rlMbi4Hc8L1STMPE99iPKqK4Gddwv8r9qZOCadsz9qTEJZ6KLEE9ruTJI6N8dKfK4CXez5pme5WIs14-1QGo29s07fQOniZgIlJV5XFL3yqzPRSUmn3",
// "+201023248456",
// "1 min",
// "1 m",
// "false",
// "QwUMoyUtZ0J3oR6yXKUavrB_gBl9npUZe-qZtax-Raq4QBbdKv0AmtLKm0BfBd6N_592HBv4CVa41ii4122W3hr-BCUKKzJhzZcK8m0YjbWbtpvgJRD8uD_nuMk9",
// "0",
// "238",
// "false",
// "114243034311436865474",
// "1488",
// "startEnd",
// "30.049307749732176,31.274291574954987",
// "",
// "",
// "",
// "",
// "17.73",
// "0",
// "hamzaayedflutter@gmail.com",
// "الفسطاط، حي مصر القديمة، مصر",
// " الزاوية الحمراء، محافظة القاهرة، مصر",
// "Speed",
// "8",
// "5.00"
// ];
// FirebaseMessagesController().sendNotificationToDriverMAP(
// 'Order'.tr,
// 'from: ',
// // jsonDecode(value)['message'].toString(),
// 'fKBBB4_1R0q18-byySHUeG:APA91bHk2RmjjMt6eKr7KQnqh4CK02yW3H5E8g_beVcQFgiCG50j9KCtSU1O8PtvS_gA5xuJLhaorDV9AeslcyLFJFf302tICKMiKgsDP5pWkF5WXNw0-4NsoD-BnJxf0-Do9Vs1Zbpq',
// d,
// 'order.wav');
// // NotificationController()
// // .showNotification('VIP Order'.tr, '', 'order', '');
// // try {} catch (e) {
// // print('Error showing overlay: $e');
// // }
// // final Bubble _bubble = Bubble(showCloseButton: true);
// // try {
// // await _bubble.startBubbleHead(sendAppToBackground: false);
// // } on PlatformException {
// // print('Failed to call startBubbleHead');
// // }
// Bubble().startBubbleHead(sendAppToBackground: true);
// }
// // Bubble().startBubbleHead(sendAppToBackground: true);
// // }
// Future<void> stopBubbleHead() async {
// try {
// await _bubble.stopBubbleHead();
// } on PlatformException {
// print('Failed to call stopBubbleHead');
// }
// }
//
// // // send data to ovelay
},
icon: const Icon(
FontAwesome5.grin_tears,
size: 29,
color: AppColor.blueColor,
),
);
}),
),
// // Future<void> stopBubbleHead() async {
// // try {
// // await _bubble.stopBubbleHead();
// // } on PlatformException {
// // print('Failed to call stopBubbleHead');
// // }
// // }
// //
// // // // send data to ovelay
// },
// icon: const Icon(
// FontAwesome5.grin_tears,
// size: 29,
// color: AppColor.blueColor,
// ),
// );
// }),
// ),
AnimatedContainer(
duration: const Duration(microseconds: 200),
width: controller.widthMapTypeAndTraffic,
@@ -282,14 +283,16 @@ GetBuilder<HomeCaptainController> leftMainMenuCaptainIcons() {
// // jsonDecode(value)['message'].toString(),
// 'fKBBB4_1R0q18-byySHUeG:APA91bHk2RmjjMt6eKr7KQnqh4CK02yW3H5E8g_beVcQFgiCG50j9KCtSU1O8PtvS_gA5xuJLhaorDV9AeslcyLFJFf302tICKMiKgsDP5pWkF5WXNw0-4NsoD-BnJxf0-Do9Vs1Zbpq',
// 'order.wav');
// NotificationController1().showNotification(
// 'sdf'.tr,
// 'We regret to inform you that another driver has accepted this order.'
// .tr,
// '',
// '');
NotificationController1().showNotification(
'sdf'.tr,
'We regret to inform you that another driver has accepted this order.'
.tr,
'',
'');
// requestLocationPermission();
Get.to(() => SmsSignupEgypt());
// Get.to(() => PassengerLocationMapPage(),
// arguments: box.read(BoxName.rideArguments));
print(box.read(BoxName.tokenDriver));
},
icon: const Icon(