From 98ee34490c7eb4c25f51006006a777125d686ba6 Mon Sep 17 00:00:00 2001 From: Hamza-Ayed Date: Wed, 11 Sep 2024 10:10:18 +0300 Subject: [PATCH] 9/11/1 --- .env | 2 + android/app/build.gradle | 4 +- lib/constant/links.dart | 2 +- lib/controller/firebase/firbase_messge.dart | 60 ++++-- .../functions/location_controller.dart | 11 +- .../home/captin/map_driver_controller.dart | 184 +++++++++++++++--- lib/controller/local/translations.dart | 12 +- lib/main.dart | 43 ++-- .../widget/left_menu_map_captain.dart | 56 +++--- .../mapDriverWidgets/driver_end_ride_bar.dart | 3 +- .../Captin/orderCaptin/vip_order_page.dart | 16 ++ lib/views/home/my_wallet/walet_captain.dart | 168 ++++++++-------- lib/views/widgets/mydialoug.dart | 14 +- 13 files changed, 373 insertions(+), 202 deletions(-) create mode 100644 lib/views/home/Captin/orderCaptin/vip_order_page.dart diff --git a/.env b/.env index b20deca..3018fea 100644 --- a/.env +++ b/.env @@ -19,6 +19,8 @@ seferAlexandriaServer=https://seferalexandria.site/sefer seferPaymentServer=https://seferpw.shop/sefer seferCairoServer=https://sefer.click/sefer seferGizaServer=https://sefergiza.site/sefer +anthropicAIkeySeferNewHamzaayedpython=zg-qbc-qvo39-vCB-WnzEwFNArO0YlTapvfhtmguKWsXJSKqg_NZSjHBYVXMZK1yUK88SobdckV0KuPaBh0c_WHtGsRO_439PBk-e2QqgkQQXrXlBl + privateKeyFCM='''{ "type": "service_account", "project_id": "ride-b1bd8", diff --git a/android/app/build.gradle b/android/app/build.gradle index eeb8ac5..d146007 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -54,8 +54,8 @@ android { // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration. minSdk = 23 targetSdk = flutter.targetSdkVersion - versionCode = 79 - versionName = '1.5.79' + versionCode = 83 + versionName = '1.5.83' multiDexEnabled =true } diff --git a/lib/constant/links.dart b/lib/constant/links.dart index 9693aee..54735ee 100644 --- a/lib/constant/links.dart +++ b/lib/constant/links.dart @@ -5,7 +5,7 @@ import 'box_name.dart'; class AppLink { static final String seferPaymentServer0 = Env.seferPaymentServer; - static final String seferPaymentServer = '${Env.seferCairoServer}/ride'; + static final String seferPaymentServer = '${Env.seferPaymentServer}/ride'; static final String seferAlexandriaServer = Env.seferAlexandriaServer; static final String seferCairoServer = Env.seferCairoServer; static final String seferGizaServer = Env.seferGizaServer; diff --git a/lib/controller/firebase/firbase_messge.dart b/lib/controller/firebase/firbase_messge.dart index 996cfc4..0fcec45 100644 --- a/lib/controller/firebase/firbase_messge.dart +++ b/lib/controller/firebase/firbase_messge.dart @@ -18,6 +18,7 @@ import '../../views/auth/captin/criminal_documents_page.dart'; import '../../views/home/Captin/home_captain/home_captin.dart'; import '../../views/home/Captin/orderCaptin/order_speed_request.dart'; import '../../views/home/Captin/orderCaptin/order_request_page.dart'; +import '../../views/home/Captin/orderCaptin/vip_order_page.dart'; import '../auth/google_sign.dart'; import '../functions/face_detect.dart'; import 'access_token.dart'; @@ -80,28 +81,28 @@ class FirebaseMessagesController extends GetxController { } }); FirebaseMessaging.onBackgroundMessage((RemoteMessage message) async { - if (message.notification!.title! == 'Order'.tr) { - if (Platform.isAndroid) { - NotificationController() - .showNotification('Order'.tr, '', 'order', 'order_page_payload'); - } - // await FirebaseMessagesController().showOverlayNotification(message); - var myListString = message.data['DriverList']; - // var points = message.data['PolylineJson']; + // if (message.notification!.title! == 'Order'.tr) { + // if (Platform.isAndroid) { + // NotificationController() + // .showNotification('Order'.tr, '', 'order', 'order_page_payload'); + // } + // // await FirebaseMessagesController().showOverlayNotification(message); + // var myListString = message.data['DriverList']; + // // var points = message.data['PolylineJson']; - var myList = jsonDecode(myListString) as List; - // var myPoints = jsonDecode(points) as List; - driverToken = myList[14].toString(); - // This is for location using and uploading status - Get.put(HomeCaptainController()).changeRideId(); - update(); - Get.to(() => OrderRequestPage(), arguments: { - 'myListString': myListString, - 'DriverList': myList, - // 'PolylineJson': myPoints, - 'body': message.notification!.body - }); - } + // var myList = jsonDecode(myListString) as List; + // // var myPoints = jsonDecode(points) as List; + // driverToken = myList[14].toString(); + // // This is for location using and uploading status + // Get.put(HomeCaptainController()).changeRideId(); + // update(); + // Get.to(() => OrderRequestPage(), arguments: { + // 'myListString': myListString, + // 'DriverList': myList, + // // 'PolylineJson': myPoints, + // 'body': message.notification!.body + // }); + // } }); FirebaseMessaging.onMessageOpenedApp.listen((RemoteMessage message) { @@ -138,6 +139,23 @@ class FirebaseMessagesController extends GetxController { // 'Cancel Trip'.tr, 'Passenger Cancel Trip'.tr, 'cancel', ''); // } cancelTripDialog(); + } else if (message.notification!.title == 'VIP Order') { + var myListString = message.data['DriverList']; + var driverList = jsonDecode(myListString) as List; + if (Platform.isAndroid) { + NotificationController() + .showNotification('VIP Order'.tr, '', 'order', ''); + } + MyDialog().getDialog('VIP Order'.tr, 'midTitle', () { + sendNotificationToPassengerToken( + 'VIP Order Accepted'.tr, + 'The driver accepted your trip'.tr, + driverList[0], + [driverList[1]], + 'order'); + }); + + // Get.to(const VipOrderPage()); } else if (message.notification!.title == 'Cancel') { cancelTripDialog1(); } else if (message.notification!.title! == 'token change') { diff --git a/lib/controller/functions/location_controller.dart b/lib/controller/functions/location_controller.dart index 654c349..b1e33d6 100644 --- a/lib/controller/functions/location_controller.dart +++ b/lib/controller/functions/location_controller.dart @@ -87,28 +87,29 @@ class LocationController extends GetxController { switch (area) { case 'Cairo': - endpoint = AppLink.addCarsLocationCairoEndpoint; box.write(BoxName.serverChosen, AppLink.seferCairoServer); + endpoint = AppLink.addCarsLocationCairoEndpoint; Log.print('Endpoint: $endpoint'); break; case 'Giza': + box.write(BoxName.serverChosen, AppLink.seferGizaServer); endpoint = AppLink.addCarsLocationGizaEndpoint; Log.print('Endpoint: $endpoint'); - box.write(BoxName.serverChosen, AppLink.seferGizaServer); break; case 'Alexandria': - endpoint = AppLink.addCarsLocationAlexandriaEndpoint; - Log.print('Endpoint: $endpoint'); box.write( BoxName.serverChosen, AppLink.seferAlexandriaServer); + endpoint = AppLink.addCarsLocationAlexandriaEndpoint; + Log.print('Endpoint: $endpoint'); break; case 'Outside': // Handle cases outside of Cairo, Giza, and Alexandria print('Location outside Cairo, Giza, or Alexandria'); + + box.write(BoxName.serverChosen, AppLink.seferCairoServer); endpoint = AppLink .addCarsLocationCairoEndpoint; // Fallback to Cairo endpoint Log.print('Fallback Endpoint: $endpoint'); - box.write(BoxName.serverChosen, AppLink.seferCairoServer); break; default: // Handle any other unexpected cases diff --git a/lib/controller/home/captin/map_driver_controller.dart b/lib/controller/home/captin/map_driver_controller.dart index ebc13e9..ea03e3f 100644 --- a/lib/controller/home/captin/map_driver_controller.dart +++ b/lib/controller/home/captin/map_driver_controller.dart @@ -566,12 +566,14 @@ class MapDriverController extends GetxController { // Get.find().changeToAppliedRide('Finished'); // Get.find().update(); totalCost = price < 30 - ? carType != 'Comfort' && carType != 'Mashwari' && carType != 'Lady' + ? carType != 'Comfort' && carType != 'Mishwar Vip' && carType != 'Lady' ? '20' : '30' : price < double.parse(totalPricePassenger) ? totalPricePassenger - : carType != 'Comfort' && carType != 'Mashwari' && carType != 'Lady' + : carType != 'Comfort' && + carType != 'Mishwar Vip' && + carType != 'Lady' ? totalPricePassenger : price.toStringAsFixed(2); paymentAmount = totalCost; @@ -633,7 +635,7 @@ class MapDriverController extends GetxController { box.read(BoxName.driverID), rideId, box.read(BoxName.tokenDriver), - // carType == 'Comfort' || carType == 'Mashwari' + // carType == 'Comfort' || carType == 'Mishwar Vip' // ? price.toStringAsFixed(2) // : totalPassenger paymentAmount.toString() @@ -681,44 +683,178 @@ class MapDriverController extends GetxController { int rideTimerFromBegin = 0; double price = 0; + DateTime currentTime = DateTime.now(); void rideIsBeginPassengerTimer() async { int durationOfRide = int.parse(durationOfRideValue); update(); int infinity = 40000; if (carType == 'Comfort' || - carType == 'Mashwari' || - carType == 'Rayeh Gai') { + carType == 'Mishwar Vip' || + carType == 'RayehGaiComfort') { durationOfRide = infinity; update(); } + if (carType != 'Comfort' || + carType != 'Mishwar Vip' || + carType != 'Lady' || + carType != 'RayehGaiComfort') { + price = double.parse(totalCost); + update(); + } for (int i = 0; i <= durationOfRide; i++) { await Future.delayed(const Duration(seconds: 1)); recentDistanceToDash = Get.find().totalDistance; rideTimerFromBegin = i; - price = carType == 'Comfort' // || carType == 'Free Ride' - ? (i ~/ 60) + - (recentDistanceToDash * - Get.find().comfortPrice) - : carType == 'Speed' - ? (i ~/ 60) + + + if (startNameLocation.toLowerCase().contains('airport') || + endNameLocation.toLowerCase().contains('airport') || + startNameLocation.contains('مطار') || + startNameLocation.contains('المطار') || + endNameLocation.contains('مطار') || + endNameLocation.contains('المطار')) { + price = carType == 'Comfort' // || carType == 'Free Ride' + ? (i ~/ 60) * Get.find().latePrice + + 20 + + (recentDistanceToDash * + Get.find().comfortPrice) + + // : carType == 'Speed' + // ? (i ~/ 60) + + // (recentDistanceToDash * + // Get.find().speedPrice) + : carType == 'Lady' + ? (i ~/ 60) * Get.find().latePrice + + 20 + + (recentDistanceToDash * + Get.find().comfortPrice) + // : carType == 'Delivery' + // ? (i ~/ 60) + + // (recentDistanceToDash * + // Get.find().deliveryPrice) + : carType == 'RayehGaiComfort' + ? (i ~/ 60) * Get.find().latePrice + + 20 + + (recentDistanceToDash * + Get.find().comfortPrice) + : (i ~/ 60) * Get.find().latePrice + + 20 + + (recentDistanceToDash * + Get.find().mashwariPrice); + } else if (currentTime.hour >= 21 && currentTime.hour < 0) { + price = carType == 'Comfort' // || carType == 'Free Ride' + ? (i ~/ 60) * Get.find().latePrice + + 20 + + (recentDistanceToDash * + Get.find().comfortPrice) + + // : carType == 'Speed' + // ? (i ~/ 60) + + // (recentDistanceToDash * + // Get.find().speedPrice) + : carType == 'Lady' + ? (i ~/ 60) * Get.find().latePrice + + 20 + + (recentDistanceToDash * + Get.find().comfortPrice) + // : carType == 'Delivery' + // ? (i ~/ 60) + + // (recentDistanceToDash * + // Get.find().deliveryPrice) + : carType == 'RayehGaiComfort' + ? (i ~/ 60) * Get.find().latePrice + + 20 + + (recentDistanceToDash * + Get.find().comfortPrice) + : (i ~/ 60) * Get.find().latePrice + + 20 + + (recentDistanceToDash * + Get.find().mashwariPrice); + } else if (currentTime.hour >= 1 && currentTime.hour < 5) { + if (startNameLocation.contains('club') || + startNameLocation.contains('nightclub') || + startNameLocation.contains('ديسكو') || + startNameLocation.contains('ملهى ليلي') || + startNameLocation.contains('Night club')) { + price = carType == 'Comfort' // || carType == 'Free Ride' + ? (i ~/ 60) * + (Get.find().latePrice + .5) * + 2 + (recentDistanceToDash * - Get.find().speedPrice) + Get.find().comfortPrice) : carType == 'Lady' - ? (i ~/ 60) + + ? (i ~/ 60) * + (Get.find().latePrice + .5) * + 2 + (recentDistanceToDash * Get.find().comfortPrice) - : carType == 'Delivery' - ? (i ~/ 60) + + : carType == 'RayehGaiComfort' + ? (i ~/ 60) * + (Get.find().latePrice + + .5) * + 2 + (recentDistanceToDash * - Get.find().deliveryPrice) - : carType == 'Rayeh Gai' - ? (i ~/ 60) + - (recentDistanceToDash * - Get.find().speedPrice) - : (i ~/ 60) + - (recentDistanceToDash * - Get.find() - .mashwariPrice); // $1 for each minute + $4 for each km + Get.find().comfortPrice) + : (i ~/ 60) * + (Get.find().latePrice + + .5) * + 2 + + (recentDistanceToDash * + Get.find().mashwariPrice); + } + price = carType == 'Comfort' // || carType == 'Free Ride' + ? (i ~/ 60) * (Get.find().latePrice + .5) + + (recentDistanceToDash * + Get.find().comfortPrice) + : carType == 'Lady' + ? (i ~/ 60) * + (Get.find().latePrice + .5) + + (recentDistanceToDash * + Get.find().comfortPrice) + : carType == 'RayehGaiComfort' + ? (i ~/ 60) * + (Get.find().latePrice + .5) + + (recentDistanceToDash * + Get.find().comfortPrice) + : (i ~/ 60) * + (Get.find().latePrice + .5) + + (recentDistanceToDash * + Get.find().mashwariPrice); + } else if (currentTime.hour >= 14 && currentTime.hour <= 17) { + price = carType == 'Comfort' // || carType == 'Free Ride' + ? (i ~/ 60) * (Get.find().heavyPrice) + + (recentDistanceToDash * + Get.find().comfortPrice) + : carType == 'Lady' + ? (i ~/ 60) * (Get.find().heavyPrice) + + (recentDistanceToDash * + Get.find().comfortPrice) + : carType == 'RayehGaiComfort' + ? (i ~/ 60) * + (Get.find().heavyPrice) + + (recentDistanceToDash * + Get.find().comfortPrice) + : (i ~/ 60) * + (Get.find().heavyPrice) + + (recentDistanceToDash * + Get.find().mashwariPrice); + } else { + price = carType == 'Comfort' // || carType == 'Free Ride' + ? (i ~/ 60) + + (recentDistanceToDash * + Get.find().comfortPrice) + : carType == 'Lady' + ? (i ~/ 60) + + (recentDistanceToDash * + Get.find().comfortPrice) + : carType == 'RayehGaiComfort' + ? (i ~/ 60) + + (recentDistanceToDash * + Get.find().comfortPrice) + : (i ~/ 60) + + (recentDistanceToDash * + Get.find().mashwariPrice); + } + // $1 for each minute + $4 for each km price = (price * double.parse(kazan)) + price; // Add 10% tax speed = Get.find().speed * 3.6; progressTimerRideBegin = i / durationOfRide; diff --git a/lib/controller/local/translations.dart b/lib/controller/local/translations.dart index 2e95b1d..b6d2ee3 100644 --- a/lib/controller/local/translations.dart +++ b/lib/controller/local/translations.dart @@ -113,14 +113,16 @@ class MyTranslation extends Translations { "National Bank of Greece": "البنك الوطني اليوناني", "Central Bank Of Egypt": "البنك المركزي المصري", "ATTIJARIWAFA BANK Egypt": "البنك التجاري وفا مصر", - "Morning Promo": "عرض الصباح", + "Morning Promo": "بونص الصباح", + "VIP Order": "طلب VIP", "VIP Order Accepted": "تم قبول طلب VIP.", + "The driver accepted your trip": "السائق قبل رحلتك.", "this is count of your all trips in the morning promo today from 7:00am-10:00am": - "هذا عدد جميع رحلاتك في عرض الصباح اليوم من الساعة 7:00 صباحًا حتى 10:00 صباحًا", + "هذا عدد جميع رحلاتك في بونص الصباح اليوم من الساعة 7:00 صباحًا حتى 10:00 صباحًا", "Morning Promo Rides": "رحلات عرض الصباح", - "Afternoon Promo": "عرض بعد الظهر", + "Afternoon Promo": "بونص الظهر", "this is count of your all trips in the Afternoon promo today from 3:00pm-6:00 pm": - "هذا عدد جميع رحلاتك في عرض بعد الظهر اليوم من الساعة 3:00 مساءً حتى 6:00 مساءً", - "Afternoon Promo Rides": "رحلات عرض بعد الظهر", + "هذا عدد جميع رحلاتك في بونص بعد الظهر اليوم من الساعة 3:00 مساءً حتى 6:00 مساءً", + "Afternoon Promo Rides": "رحلات بونص بعد الظهر", "Heading your way now. Please be ready.": "في طريقي إليك الآن. يرجى الاستعداد.", "Approaching your area. Should be there in 3 minutes.": diff --git a/lib/main.dart b/lib/main.dart index ca8f252..ebdf5d0 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -36,9 +36,12 @@ final PaymobPayment paymobPayment = PaymobPayment(); final PaymobPaymentWallet paymobPaymentWallet = PaymobPaymentWallet(); DbSql sql = DbSql.instance; +final GlobalKey navigatorKey = GlobalKey(); + @pragma('vm:entry-point') Future backgroundMessageHandler(RemoteMessage message) async { await Firebase.initializeApp(); + if (Platform.isAndroid) { if (message.notification != null && message.notification!.title != null) { if (message.notification?.title == 'Order' || @@ -47,7 +50,7 @@ Future backgroundMessageHandler(RemoteMessage message) async { Log.print('myListString: $myListString'); // Decode the JSON string to a list - var myList; + List myList; try { myList = jsonDecode(myListString) as List; } catch (e) { @@ -55,7 +58,7 @@ Future backgroundMessageHandler(RemoteMessage message) async { myList = []; } - Future.delayed(const Duration(seconds: 1)); + await Future.delayed(const Duration(seconds: 1)); NotificationController().showNotification( message.notification!.title.toString(), message.notification!.body.toString(), @@ -67,6 +70,7 @@ Future backgroundMessageHandler(RemoteMessage message) async { if (isOverlayActive) { await FlutterOverlayWindow.closeOverlay(); } + await FlutterOverlayWindow.showOverlay( enableDrag: true, flag: OverlayFlag.focusPointer, @@ -78,8 +82,6 @@ Future backgroundMessageHandler(RemoteMessage message) async { ); await FlutterOverlayWindow.shareData(myList); - - // Bubble().startBubbleHead(sendAppToBackground: true); } } else { FirebaseMessagesController().fireBaseTitles(message); @@ -87,8 +89,6 @@ Future backgroundMessageHandler(RemoteMessage message) async { } } -final GlobalKey navigatorKey = GlobalKey(); - @pragma('vm:entry-point') void overlayMain() async { WidgetsFlutterBinding.ensureInitialized(); @@ -105,21 +105,18 @@ void closeOverLay() { void main() async { WidgetsFlutterBinding.ensureInitialized(); - WakelockPlus.enable(); - // Request location permission first + await WakelockPlus.enable(); + + // Request location permission PermissionStatus status = await Permission.location.request(); if (status.isDenied) { WidgetsBinding.instance.addPostFrameCallback((_) { getPermissionLocation(); }); - // Handle the case when permission is denied - // You might want to show a dialog explaining why the permission is needed return; } - // Set up the overlay entry point - // FlutterOverlayWindow.overlayMain = overlayMain; - await LocationController().startLocationUpdates(); + await LocationController().startLocationUpdates(); await GetStorage.init(); Stripe.publishableKey = AK.publishableKeyStripe; @@ -131,12 +128,12 @@ void main() async { FirebaseMessaging.onBackgroundMessage(backgroundMessageHandler); NotificationController().initNotifications(); - List initializationTasks = [ + + await Future.wait([ FirebaseMessagesController().getNotificationSettings(), FirebaseMessagesController().getToken(), - ]; + ]); - await Future.wait(initializationTasks); SystemChrome.setPreferredOrientations([ DeviceOrientation.portraitUp, DeviceOrientation.portraitDown, @@ -160,8 +157,6 @@ void main() async { } class MyApp extends StatelessWidget { - MyApp({super.key}); - @override Widget build(BuildContext context) { LocaleController localController = Get.put(LocaleController()); @@ -172,18 +167,14 @@ class MyApp extends StatelessWidget { debugShowCheckedModeBanner: false, locale: localController.language, theme: localController.appTheme, - key: UniqueKey(), initialRoute: '/', - // home: SplashScreen(), - routes: { - '/order': (context) => OrderRequestPage(), - }, getPages: [ GetPage(name: '/', page: () => SplashScreen()), GetPage( - name: '/order-page', - page: () => OrderRequestPage(), - arguments: box.read(BoxName.rideArguments)), + name: '/order-page', + page: () => OrderRequestPage(), + arguments: box.read(BoxName.rideArguments), + ), ], ); } diff --git a/lib/views/home/Captin/home_captain/widget/left_menu_map_captain.dart b/lib/views/home/Captin/home_captain/widget/left_menu_map_captain.dart index a516374..54c4a68 100644 --- a/lib/views/home/Captin/home_captain/widget/left_menu_map_captain.dart +++ b/lib/views/home/Captin/home_captain/widget/left_menu_map_captain.dart @@ -9,6 +9,7 @@ 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 '../../../../../print.dart'; import '../../../../Rate/ride_calculate_driver.dart'; @@ -270,34 +271,35 @@ GetBuilder 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 { - // FirebaseMessagesController().sendNotificationToAnyWithoutData( - // 'Order'.tr, - // 'from: ', - // // jsonDecode(value)['message'].toString(), - // 'dEugS-JOT4Ka5riF4s5TEN:APA91bEDL_W7BuEQGbyL-RMaKiMWDlURXhFuaybe5WurTUV8K5eIooSGe22yY22_U2hEZcfPr46ig1v--l00dbOGiivazxvmTyhUyQQW6lJsuIN-wordGtBxtREyeYtEKvxIa1J4ApEu', - // 'order.wav' + 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 { + // FirebaseMessagesController().sendNotificationToAnyWithoutData( + // 'Order'.tr, + // 'from: ', + // // jsonDecode(value)['message'].toString(), + // 'dEugS-JOT4Ka5riF4s5TEN:APA91bEDL_W7BuEQGbyL-RMaKiMWDlURXhFuaybe5WurTUV8K5eIooSGe22yY22_U2hEZcfPr46ig1v--l00dbOGiivazxvmTyhUyQQW6lJsuIN-wordGtBxtREyeYtEKvxIa1J4ApEu', + // 'order.wav' - // // polylineCoordinates.toString() - // ); - // }, - // icon: const Icon( - // FontAwesome5.closed_captioning, - // size: 29, - // color: AppColor.blueColor, - // ), - // ); - // }), - // ), + // // polylineCoordinates.toString() + // ); + print(AppLink.addDriverPaymentPoints); + }, + icon: const Icon( + FontAwesome5.closed_captioning, + size: 29, + color: AppColor.blueColor, + ), + ); + }), + ), ], )), ); diff --git a/lib/views/home/Captin/mapDriverWidgets/driver_end_ride_bar.dart b/lib/views/home/Captin/mapDriverWidgets/driver_end_ride_bar.dart index a40025c..ab2b28b 100644 --- a/lib/views/home/Captin/mapDriverWidgets/driver_end_ride_bar.dart +++ b/lib/views/home/Captin/mapDriverWidgets/driver_end_ride_bar.dart @@ -63,7 +63,8 @@ GetBuilder driverEndRideBar() { ) : const SizedBox(), mapDriverController.carType != 'Speed' && - mapDriverController.carType != 'Delivery' + mapDriverController.carType != 'Delivery' && + mapDriverController.carType != 'Balash' ? Row( mainAxisAlignment: MainAxisAlignment.spaceAround, children: [ diff --git a/lib/views/home/Captin/orderCaptin/vip_order_page.dart b/lib/views/home/Captin/orderCaptin/vip_order_page.dart new file mode 100644 index 0000000..fb268a6 --- /dev/null +++ b/lib/views/home/Captin/orderCaptin/vip_order_page.dart @@ -0,0 +1,16 @@ +import 'package:SEFER/views/widgets/my_scafold.dart'; +import 'package:flutter/material.dart'; +import 'package:get/get.dart'; + +class VipOrderPage extends StatelessWidget { + const VipOrderPage({super.key}); + + @override + Widget build(BuildContext context) { + return MyScafolld( + title: 'VIP Order'.tr, + body: [], + isleading: true, + ); + } +} diff --git a/lib/views/home/my_wallet/walet_captain.dart b/lib/views/home/my_wallet/walet_captain.dart index 8c32831..67aff41 100644 --- a/lib/views/home/my_wallet/walet_captain.dart +++ b/lib/views/home/my_wallet/walet_captain.dart @@ -398,26 +398,26 @@ class WalletCaptain extends StatelessWidget { GetBuilder( builder: (captainWalletController) { - return Padding( - padding: const EdgeInsets.all(8.0), - child: Row( - children: [ - SizedBox( - width: Get.width * .9, - // height: Get.height * .1, - // decoration: AppStyle.boxDecoration, - child: Stack( - children: [ - InkWell( - onTap: () { - MyDialog().getDialog( - 'Morning Promo'.tr, - "this is count of your all trips in the morning promo today from 7:00am-10:00am" - .tr, () { - Get.back(); - }); - }, - child: LinearProgressIndicator( + return InkWell( + onTap: () { + MyDialog().getDialog( + 'Morning Promo'.tr, + "this is count of your all trips in the morning promo today from 7:00am-10:00am" + .tr, () { + Get.back(); + }); + }, + child: Padding( + padding: const EdgeInsets.all(8.0), + child: Row( + children: [ + SizedBox( + width: Get.width * .9, + // height: Get.height * .1, + // decoration: AppStyle.boxDecoration, + child: Stack( + children: [ + LinearProgressIndicator( minHeight: 35, color: AppColor.blueColor, borderRadius: @@ -431,53 +431,53 @@ class WalletCaptain extends StatelessWidget { .toString()) / 5, ), - ), - Row( - mainAxisAlignment: - MainAxisAlignment.center, - children: [ - Text( - 'Morning Promo Rides'.tr, - style: AppStyle.title, - ), - const SizedBox( - width: 20, - ), - Text( - '${captainWalletController.walletDate['message'][0]['morning_count']} / 5', - style: AppStyle.title, - ), - ], - ), - ], - ), - ) - ], + Row( + mainAxisAlignment: + MainAxisAlignment.center, + children: [ + Text( + 'Morning Promo Rides'.tr, + style: AppStyle.title, + ), + const SizedBox( + width: 20, + ), + Text( + '${captainWalletController.walletDate['message'][0]['morning_count']} / 5', + style: AppStyle.title, + ), + ], + ), + ], + ), + ) + ], + ), ), ); }), GetBuilder( builder: (captainWalletController) { - return Padding( - padding: const EdgeInsets.all(8.0), - child: Row( - children: [ - SizedBox( - width: Get.width * .9, - // height: Get.height * .1, - // decoration: AppStyle.boxDecoration, - child: Stack( - children: [ - InkWell( - onTap: () { - MyDialog().getDialog( - 'Afternoon Promo'.tr, - "this is count of your all trips in the Afternoon promo today from 3:00pm-6:00 pm" - .tr, () { - Get.back(); - }); - }, - child: LinearProgressIndicator( + return InkWell( + onTap: () { + MyDialog().getDialog( + 'Afternoon Promo'.tr, + "this is count of your all trips in the Afternoon promo today from 3:00pm-6:00 pm" + .tr, () { + Get.back(); + }); + }, + child: Padding( + padding: const EdgeInsets.all(8.0), + child: Row( + children: [ + SizedBox( + width: Get.width * .9, + // height: Get.height * .1, + // decoration: AppStyle.boxDecoration, + child: Stack( + children: [ + LinearProgressIndicator( minHeight: 35, color: AppColor.blueColor, borderRadius: @@ -491,28 +491,28 @@ class WalletCaptain extends StatelessWidget { .toString()) / 5, ), - ), - Row( - mainAxisAlignment: - MainAxisAlignment.center, - children: [ - Text( - 'Afternoon Promo Rides'.tr, - style: AppStyle.title, - ), - const SizedBox( - width: 20, - ), - Text( - '${captainWalletController.walletDate['message'][0]['afternoon_count']} / 5', - style: AppStyle.title, - ), - ], - ), - ], - ), - ) - ], + Row( + mainAxisAlignment: + MainAxisAlignment.center, + children: [ + Text( + 'Afternoon Promo Rides'.tr, + style: AppStyle.title, + ), + const SizedBox( + width: 20, + ), + Text( + '${captainWalletController.walletDate['message'][0]['afternoon_count']} / 5', + style: AppStyle.title, + ), + ], + ), + ], + ), + ) + ], + ), ), ); }), diff --git a/lib/views/widgets/mydialoug.dart b/lib/views/widgets/mydialoug.dart index 20dfb5c..af1292d 100644 --- a/lib/views/widgets/mydialoug.dart +++ b/lib/views/widgets/mydialoug.dart @@ -37,15 +37,16 @@ class MyDialog extends GetxController { ), actions: [ CupertinoDialogAction( - child: Text('Cancel', style: TextStyle(color: AppColor.redColor)), + child: const Text('Cancel', + style: TextStyle(color: AppColor.redColor)), onPressed: () { Get.back(); }, ), CupertinoDialogAction( - child: - Text('OK'.tr, style: TextStyle(color: AppColor.greenColor)), onPressed: onPressed, + child: Text('OK'.tr, + style: const TextStyle(color: AppColor.greenColor)), ), ], ), @@ -84,15 +85,16 @@ class MyDialogContent extends GetxController { ), actions: [ CupertinoDialogAction( - child: Text('Cancel', style: TextStyle(color: AppColor.redColor)), + child: const Text('Cancel', + style: TextStyle(color: AppColor.redColor)), onPressed: () { Get.back(); }, ), CupertinoDialogAction( - child: - Text('OK'.tr, style: TextStyle(color: AppColor.greenColor)), onPressed: onPressed, + child: Text('OK'.tr, + style: const TextStyle(color: AppColor.greenColor)), ), ], ),