diff --git a/.env b/.env index 707346b..07042e8 100644 --- a/.env +++ b/.env @@ -27,9 +27,9 @@ agoraAppId=71880f2j636509j24y5294480y30u848XrXlBl agoraAppCertificate=j17q944u49390q758u1649448q2y6xfuXrXlBl usernamePayMob=37319104052XrXlBl passwordPayMob='g@nkD2#99!hD_.wXrXlBl' -integrationIdPayMob=0552355XrXlBl +integrationIdPayMob=0237730XrXlBl payMobApikey='MDrGqKEWS1rVqHvEPDvPjJ7vZDBExrO7S3BEBgrlfUwTA3i5RnP5ZnvoL3M2S9rEBgrlNTdexH5pTPf7NJrvy1reZJv1Tn7zf7vTIDywjHg1C7Ley38HTDyNA3v7TPfdxJrax1rwPmPtMJyzqKEYZeghq3MuLUrFH3A1AgHcH15CZ9UaZTLOxnw0BTdzHHrBArisZerUMUUzZ1BnBeEijHvNjYLnS1BUICMhSmPhA15ifHyVqKEMHWyKLbyuIPvcH9UeL3vZyDf=XrXlBl' -integrationIdPayMobWallet=0552352XrXlBl +integrationIdPayMobWallet=0237739XrXlBl ocpApimSubscriptionKey=17373j50x53u07q0830634f512j731yuXrXlBl smsPasswordEgypt="J)Vh=qb/@MXrXlBl" chatGPTkeySeferNew4=zg-vlie-2l1ZlpxiLJ6wQOvbb4TnC9XrxgUEyVQIu6TID4qP4FUUqoS5XrXlBl diff --git a/android/app/src/main/res/drawable/app_icon.png b/android/app/src/main/res/drawable/app_icon.png index 624b71d..740f789 100644 Binary files a/android/app/src/main/res/drawable/app_icon.png and b/android/app/src/main/res/drawable/app_icon.png differ diff --git a/android/app/src/main/res/mipmap-hdpi/launcher_icon.png b/android/app/src/main/res/mipmap-hdpi/launcher_icon.png index 843b118..ce698d8 100644 Binary files a/android/app/src/main/res/mipmap-hdpi/launcher_icon.png and b/android/app/src/main/res/mipmap-hdpi/launcher_icon.png differ diff --git a/android/app/src/main/res/mipmap-mdpi/launcher_icon.png b/android/app/src/main/res/mipmap-mdpi/launcher_icon.png index 7733536..60aeb39 100644 Binary files a/android/app/src/main/res/mipmap-mdpi/launcher_icon.png and b/android/app/src/main/res/mipmap-mdpi/launcher_icon.png differ diff --git a/android/app/src/main/res/mipmap-xhdpi/launcher_icon.png b/android/app/src/main/res/mipmap-xhdpi/launcher_icon.png index 239ad3d..03841d3 100644 Binary files a/android/app/src/main/res/mipmap-xhdpi/launcher_icon.png and b/android/app/src/main/res/mipmap-xhdpi/launcher_icon.png differ diff --git a/android/app/src/main/res/mipmap-xxhdpi/launcher_icon.png b/android/app/src/main/res/mipmap-xxhdpi/launcher_icon.png index 8351f49..cebd95d 100644 Binary files a/android/app/src/main/res/mipmap-xxhdpi/launcher_icon.png and b/android/app/src/main/res/mipmap-xxhdpi/launcher_icon.png differ diff --git a/android/app/src/main/res/mipmap-xxxhdpi/launcher_icon.png b/android/app/src/main/res/mipmap-xxxhdpi/launcher_icon.png index 2c5fd48..740f789 100644 Binary files a/android/app/src/main/res/mipmap-xxxhdpi/launcher_icon.png and b/android/app/src/main/res/mipmap-xxxhdpi/launcher_icon.png differ diff --git a/assets/images/logo.png b/assets/images/logo.png index 900fe16..ad8ba5a 100644 Binary files a/assets/images/logo.png and b/assets/images/logo.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png new file mode 100644 index 0000000..743a18f Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png new file mode 100644 index 0000000..79cbef9 Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png new file mode 100644 index 0000000..ea09381 Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png new file mode 100644 index 0000000..119aae4 Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png new file mode 100644 index 0000000..07ff072 Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png new file mode 100644 index 0000000..266f175 Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png new file mode 100644 index 0000000..464a9e2 Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png new file mode 100644 index 0000000..ea09381 Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png new file mode 100644 index 0000000..01ff8aa Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png new file mode 100644 index 0000000..4b81c4a Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-50x50@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-50x50@1x.png new file mode 100644 index 0000000..49904f4 Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-50x50@1x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-50x50@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-50x50@2x.png new file mode 100644 index 0000000..e4bfa33 Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-50x50@2x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@1x.png new file mode 100644 index 0000000..0e978bc Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@1x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@2x.png new file mode 100644 index 0000000..7efd6f0 Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@2x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png new file mode 100644 index 0000000..4b81c4a Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png new file mode 100644 index 0000000..ff03ce0 Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@1x.png new file mode 100644 index 0000000..ce698d8 Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@1x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@2x.png new file mode 100644 index 0000000..cebd95d Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@2x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png new file mode 100644 index 0000000..3ae00f4 Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png new file mode 100644 index 0000000..5ae9567 Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png new file mode 100644 index 0000000..81ff6f2 Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png differ diff --git a/lib/controller/home/captin/home_captain_controller.dart b/lib/controller/home/captin/home_captain_controller.dart index 831011a..d0ff749 100644 --- a/lib/controller/home/captin/home_captain_controller.dart +++ b/lib/controller/home/captin/home_captain_controller.dart @@ -25,7 +25,7 @@ class HomeCaptainController extends GetxController { Timer? activeTimer; Map data = {}; bool isLoading = true; - late double kazan; + late double kazan = 0; double latePrice = 0; double heavyPrice = 0; double comfortPrice = 0, @@ -273,6 +273,7 @@ class HomeCaptainController extends GetxController { mashwariPrice = double.parse(json['message'][0]['freePrice']); fuelPrice = double.parse(json['message'][0]['fuelPrice']); } + update(); } double mpg = 0; diff --git a/lib/controller/home/payment/captain_wallet_controller.dart b/lib/controller/home/payment/captain_wallet_controller.dart index d7e0616..f043b1d 100644 --- a/lib/controller/home/payment/captain_wallet_controller.dart +++ b/lib/controller/home/payment/captain_wallet_controller.dart @@ -3,6 +3,7 @@ import 'dart:convert'; import 'package:SEFER/constant/colors.dart'; import 'package:SEFER/constant/style.dart'; import 'package:SEFER/controller/firebase/firbase_messge.dart'; +import 'package:SEFER/controller/home/captin/home_captain_controller.dart'; import 'package:SEFER/views/widgets/elevated_btn.dart'; import 'package:flutter/material.dart'; import 'package:get/get.dart'; @@ -20,6 +21,7 @@ class CaptainWalletController extends GetxController { Map walletDriverPointsDate = {}; final formKey = GlobalKey(); String totalAmount = '0'; + double kazan = 0; String totalAmountVisa = '0'; String totalPoints = '0'; final amountFromBudgetController = TextEditingController(); @@ -36,6 +38,16 @@ class CaptainWalletController extends GetxController { await addDriverPaymentPoints('fromBudgetToPoints', int.parse((amountFromBudgetController.text)) * -1); + var paymentToken3 = await generateToken( + (int.parse(amountFromBudgetController.text) * -1).toString()); + await CRUD().post(link: AppLink.addDrivePayment, payload: { + 'amount': (int.parse(amountFromBudgetController.text) * -1).toString(), + 'rideId': paymentID.toString(), + 'payment_method': 'myBudget', + 'passengerID': 'myBudgetToPoint', + 'token': paymentToken3, + 'driverID': box.read(BoxName.driverID).toString(), + }); Future.delayed(const Duration(seconds: 2)); await addDriverWallet('fromBudget', pointFromBudget.toString()); update(); @@ -201,7 +213,8 @@ class CaptainWalletController extends GetxController { await CRUD().post(link: AppLink.addDriversWalletPoints, payload: { 'driverID': amountToNewDriverMap[0]['id'].toString(), 'paymentID': paymentID.toString(), - 'amount': ((int.parse(amountFromBudgetController.text) - 5) / .08) + 'amount': ((int.parse(amountFromBudgetController.text) - 5) / + kazan) // double.parse(kazan) .08 for egypt .toStringAsFixed( 0), // this will convert buddget to poitns by kazan .08 @@ -252,7 +265,10 @@ class CaptainWalletController extends GetxController { } @override - void onInit() { + void onInit() async { + await Get.find().getKazanPercent(); + kazan = Get.find().kazan; + getCaptainWalletFromRide(); getCaptainWalletFromBuyPoints(); // checkAccountCaptainBank(); 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 ae239f2..a2911d8 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 @@ -7,7 +7,9 @@ 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 '../../../../Rate/ride_calculate_driver.dart'; import '../../../../../controller/functions/location_controller.dart'; @@ -18,33 +20,35 @@ GetBuilder 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 = 'seferface:malDev@2101'; - // String convertedStringN = credentials.c( - // credentials.c(credentials.c(apiKey, cs), cC), cn); - // - // String retrievedStringS = credentials.r( - // credentials.r(credentials.r(convertedStringN, cn), cC), - // cs); - // // - // if (retrievedStringS == apiKey) { - // } - // }, - // icon: const Icon( - // FontAwesome.map_signs, - // size: 24, - // color: Colors.black, - // )), - // ), + 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 = '4601103'; + 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'); + } + }, + icon: const Icon( + FontAwesome.map_signs, + size: 24, + color: Colors.black, + )), + ), const SizedBox( height: 5, ), @@ -153,25 +157,25 @@ 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: IconButton( - onPressed: () { - Get.to(() => PassengerLocationMapPage(), - arguments: box.read(BoxName.rideArguments)); - }, - icon: const Icon( - FontAwesome5.grin_tears, - size: 29, - color: AppColor.blueColor, - ), - ), - ), + // 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: IconButton( + // onPressed: () { + // Get.to(() => PassengerLocationMapPage(), + // arguments: box.read(BoxName.rideArguments)); + // }, + // icon: const Icon( + // FontAwesome5.grin_tears, + // size: 29, + // color: AppColor.blueColor, + // ), + // ), + // ), ], )), ); diff --git a/pubspec.lock b/pubspec.lock index 58a3a9d..a0117a8 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -249,6 +249,14 @@ packages: url: "https://pub.dev" source: hosted version: "1.7.4" + cli_util: + dependency: transitive + description: + name: cli_util + sha256: c05b7406fdabc7a49a3929d4af76bcaccbbffcbcdcf185b082e1ae07da323d19 + url: "https://pub.dev" + source: hosted + version: "0.4.1" clock: dependency: transitive description: @@ -542,6 +550,14 @@ packages: url: "https://pub.dev" source: hosted version: "2.2.7" + flutter_launcher_icons: + dependency: "direct main" + description: + name: flutter_launcher_icons + sha256: "526faf84284b86a4cb36d20a5e45147747b7563d921373d4ee0559c54fcdbcea" + url: "https://pub.dev" + source: hosted + version: "0.13.1" flutter_lints: dependency: "direct dev" description: @@ -1188,26 +1204,26 @@ packages: dependency: transitive description: name: leak_tracker - sha256: "78eb209deea09858f5269f5a5b02be4049535f568c07b275096836f01ea323fa" + sha256: "7f0df31977cb2c0b88585095d168e689669a2cc9b97c309665e3386f3e9d341a" url: "https://pub.dev" source: hosted - version: "10.0.0" + version: "10.0.4" leak_tracker_flutter_testing: dependency: transitive description: name: leak_tracker_flutter_testing - sha256: b46c5e37c19120a8a01918cfaf293547f47269f7cb4b0058f21531c2465d6ef0 + sha256: "06e98f569d004c1315b991ded39924b21af84cf14cc94791b8aea337d25b57f8" url: "https://pub.dev" source: hosted - version: "2.0.1" + version: "3.0.3" leak_tracker_testing: dependency: transitive description: name: leak_tracker_testing - sha256: a597f72a664dbd293f3bfc51f9ba69816f84dcd403cdac7066cb3f6003f3ab47 + sha256: "6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3" url: "https://pub.dev" source: hosted - version: "2.0.1" + version: "3.0.1" lints: dependency: transitive description: @@ -1308,10 +1324,10 @@ packages: dependency: transitive description: name: meta - sha256: d584fa6707a52763a52446f02cc621b077888fb63b93bbcb1143a7be5a0c0c04 + sha256: "7687075e408b093f36e6bbf6c91878cc0d4cd10f409506f7bc996f68220b9136" url: "https://pub.dev" source: hosted - version: "1.11.0" + version: "1.12.0" mime: dependency: transitive description: @@ -1777,10 +1793,10 @@ packages: dependency: transitive description: name: test_api - sha256: "5c2f730018264d276c20e4f1503fd1308dfbbae39ec8ee63c5236311ac06954b" + sha256: "9955ae474176f7ac8ee4e989dadfb411a58c30415bcfb648fa04b2b8a03afa7f" url: "https://pub.dev" source: hosted - version: "0.6.1" + version: "0.7.0" timezone: dependency: transitive description: @@ -1961,10 +1977,10 @@ packages: dependency: transitive description: name: vm_service - sha256: b3d56ff4341b8f182b96aceb2fa20e3dcb336b9f867bc0eafc0de10f1048e957 + sha256: "3923c89304b715fb1eb6423f017651664a03bf5f4b29983627c4da791f74a4ec" url: "https://pub.dev" source: hosted - version: "13.0.0" + version: "14.2.1" wakelock_plus: dependency: "direct main" description: diff --git a/pubspec.yaml b/pubspec.yaml index 6b000c6..8c25843 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -31,7 +31,7 @@ dependencies: flutter_secure_storage: ^9.0.0 geolocator: ^10.0.0 flutter_paypal: ^0.2.0 - # flutter_launcher_icons: ^0.13.1 #to be remove + flutter_launcher_icons: ^0.13.1 #to be remove # crypto: ^3.0.3 flutter_rating_bar: ^4.0.1 flutter_font_icons: ^2.2.5 @@ -71,23 +71,23 @@ dev_dependencies: envied_generator: ^0.5.2 build_runner: ^2.4.6 -# flutter_launcher_icons: -# android: "launcher_icon" -# ios: true -# image_path: "assets/images/logo.png" -# min_sdk_android: 21 -# web: -# generate: true -# image_path: "assets/images/logo.png" -# background_color: "#hexcode" -# theme_color: "#hexcode" -# windows: -# generate: true -# image_path: "assets/images/logo.png" -# icon_size: 48 -# macos: -# generate: true -# image_path: "assets/images/logo.png" +flutter_launcher_icons: + android: "launcher_icon" + ios: true + image_path: "assets/images/logo.png" + min_sdk_android: 21 + web: + generate: true + image_path: "assets/images/logo.png" + background_color: "#hexcode" + theme_color: "#hexcode" + windows: + generate: true + image_path: "assets/images/logo.png" + icon_size: 48 + macos: + generate: true + image_path: "assets/images/logo.png" flutter: uses-material-design: true