10/26/1
This commit is contained in:
@@ -1,28 +1,21 @@
|
||||
import 'dart:io';
|
||||
import 'dart:convert';
|
||||
|
||||
import 'package:SEFER/constant/box_name.dart';
|
||||
import 'package:SEFER/controller/firebase/local_notification.dart';
|
||||
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:bubble_head/bubble.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_font_icons/flutter_font_icons.dart';
|
||||
import 'package:bubble_head/bubble.dart';
|
||||
import 'package:flutter_overlay_window/flutter_overlay_window.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/colors.dart';
|
||||
import '../../../../../constant/links.dart';
|
||||
import '../../../../../controller/firebase/firbase_messge.dart';
|
||||
import '../../../../../controller/functions/location_permission.dart';
|
||||
import '../../../../../controller/functions/overlay_permisssion.dart';
|
||||
import '../../../../../print.dart';
|
||||
import '../../../../../controller/functions/audio_controller.dart';
|
||||
import '../../../../Rate/ride_calculate_driver.dart';
|
||||
import '../../../../../controller/functions/location_controller.dart';
|
||||
import '../../driver_map_page.dart';
|
||||
import '../../orderCaptin/order_speed_request.dart';
|
||||
|
||||
GetBuilder<HomeCaptainController> leftMainMenuCaptainIcons() {
|
||||
return GetBuilder<HomeCaptainController>(
|
||||
@@ -186,32 +179,7 @@ GetBuilder<HomeCaptainController> leftMainMenuCaptainIcons() {
|
||||
height: 5,
|
||||
),
|
||||
// Platform.isAndroid
|
||||
// ? 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 {
|
||||
// bool isOverlayActive =
|
||||
// await FlutterOverlayWindow.isActive();
|
||||
// if (isOverlayActive) {
|
||||
// await FlutterOverlayWindow.closeOverlay();
|
||||
// }
|
||||
// // print(box.read(BoxName.tokenDriver));
|
||||
// },
|
||||
// icon: const Icon(
|
||||
// FontAwesome5.window_close,
|
||||
// size: 29,
|
||||
// color: AppColor.blueColor,
|
||||
// ),
|
||||
// );
|
||||
// }),
|
||||
// )
|
||||
// : const SizedBox(),
|
||||
// ?
|
||||
// AnimatedContainer(
|
||||
// duration: const Duration(microseconds: 200),
|
||||
// width: controller.widthMapTypeAndTraffic,
|
||||
@@ -222,63 +190,109 @@ GetBuilder<HomeCaptainController> leftMainMenuCaptainIcons() {
|
||||
// child: Builder(builder: (context) {
|
||||
// return IconButton(
|
||||
// onPressed: () async {
|
||||
// Get.to(() => LoginCaptin());
|
||||
// // NotificationController().showNotification(
|
||||
// // ' message.notification!.title.toString()',
|
||||
// // ' message.notification!.body.toString()',
|
||||
// // 'order',
|
||||
// // '');
|
||||
// },
|
||||
// icon: const Icon(
|
||||
// FontAwesome5.window_close,
|
||||
// size: 29,
|
||||
// color: AppColor.blueColor,
|
||||
// ),
|
||||
// );
|
||||
// }),
|
||||
// ),
|
||||
// : 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 {
|
||||
// // Get.to(() => LoginCaptin());
|
||||
// // print(box.read(BoxName.myList));
|
||||
// // Bubble().startBubbleHead(sendAppToBackground: true);
|
||||
// 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"
|
||||
// ];
|
||||
|
||||
// // 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');
|
||||
// // }
|
||||
// box.write(BoxName.rideArguments, {
|
||||
// 'passengerLocation': d[0].toString(),
|
||||
// 'passengerDestination': d[1].toString(),
|
||||
// 'Duration': d[4].toString(),
|
||||
// 'totalCost': d[26].toString(),
|
||||
// 'Distance': d[5].toString(),
|
||||
// 'name': d[8].toString(),
|
||||
// 'phone': d[10].toString(),
|
||||
// 'email': d[28].toString(),
|
||||
// 'WalletChecked': d[13].toString(),
|
||||
// 'tokenPassenger': d[9].toString(),
|
||||
// 'direction':
|
||||
// 'https://www.google.com/maps/dir/${d[0]}/${d[1]}/',
|
||||
// 'DurationToPassenger': d[15].toString(),
|
||||
// 'rideId': d[16].toString(),
|
||||
// 'passengerId': d[7].toString(),
|
||||
// 'driverId': d[18].toString(),
|
||||
// 'durationOfRideValue': d[19].toString(),
|
||||
// 'paymentAmount': d[2].toString(),
|
||||
// 'paymentMethod':
|
||||
// d[13].toString() == 'true' ? 'visa' : 'cash',
|
||||
// 'isHaveSteps': d[20].toString(),
|
||||
// 'step0': d[21].toString(),
|
||||
// 'step1': d[22].toString(),
|
||||
// 'step2': d[23].toString(),
|
||||
// 'step3': d[24].toString(),
|
||||
// 'step4': d[25].toString(),
|
||||
// 'passengerWalletBurc': d[26].toString(),
|
||||
// 'timeOfOrder': DateTime.now().toString(),
|
||||
// 'totalPassenger': d[2].toString(),
|
||||
// 'carType': d[31].toString(),
|
||||
// 'kazan': d[32].toString(),
|
||||
// 'startNameLocation': d[29].toString(),
|
||||
// 'endNameLocation': d[30].toString(),
|
||||
// });
|
||||
// Get.to(() => PassengerLocationMapPage(),
|
||||
// arguments: box.read(BoxName.rideArguments));
|
||||
// // Get.offAll(() => HomeCaptainController());
|
||||
// },
|
||||
// icon: const Icon(
|
||||
// FontAwesome5.grin_tears,
|
||||
@@ -288,6 +302,7 @@ GetBuilder<HomeCaptainController> leftMainMenuCaptainIcons() {
|
||||
// );
|
||||
// }),
|
||||
// ),
|
||||
// ,
|
||||
const SizedBox(
|
||||
height: 5,
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user