This commit is contained in:
Hamza-Ayed
2024-10-01 19:36:38 +03:00
parent 659f178737
commit 6f95dafd0b
13 changed files with 250 additions and 307 deletions

View File

@@ -54,8 +54,8 @@ android {
// For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration. // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration.
minSdk = 23 minSdk = 23
targetSdk = flutter.targetSdkVersion targetSdk = flutter.targetSdkVersion
versionCode = 95 versionCode = 101
versionName = '1.5.95' versionName = '1.5.01'
multiDexEnabled =true multiDexEnabled =true
} }

View File

@@ -33,22 +33,6 @@
android:icon="@mipmap/launcher_icon" android:icon="@mipmap/launcher_icon"
android:label="Sefer Driver" android:label="Sefer Driver"
android:theme="@style/LaunchTheme"> android:theme="@style/LaunchTheme">
<meta-data android:name="com.facebook.sdk.ApplicationId"
android:value="@string/facebook_app_id" />
<activity android:name="com.facebook.FacebookActivity"
android:configChanges="keyboard|keyboardHidden|screenLayout|screenSize|orientation"
android:label="@string/app_name" />
<activity
android:name="com.facebook.CustomTabActivity"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="@string/fb_login_protocol_scheme" />
</intent-filter>
</activity>
<service <service
android:name=".MyFirebaseMessagingService" android:name=".MyFirebaseMessagingService"
android:exported="false"></service> android:exported="false"></service>
@@ -75,7 +59,6 @@
android:name="com.yalantis.ucrop.UCropActivity" android:name="com.yalantis.ucrop.UCropActivity"
android:screenOrientation="portrait" android:screenOrientation="portrait"
android:theme="@style/Theme.AppCompat.Light.NoActionBar" /> android:theme="@style/Theme.AppCompat.Light.NoActionBar" />
<meta-data <meta-data
android:name="com.google.android.geo.API_KEY" android:name="com.google.android.geo.API_KEY"
android:value="@string/api_key" /> android:value="@string/api_key" />
@@ -91,7 +74,14 @@
android:exported="false" android:exported="false"
android:foregroundServiceType="location" /> android:foregroundServiceType="location" />
<!-- Firebase Messaging Service -->
<!-- <service
android:name=".java.MyFirebaseMessagingService"
android:exported="false">
<intent-filter>
<action android:name="com.google.firebase.MESSAGING_EVENT" />
</intent-filter>
</service> -->
<service <service
android:name="com.google.firebase.messaging.FirebaseMessagingService" android:name="com.google.firebase.messaging.FirebaseMessagingService"
android:exported="false" android:exported="false"
@@ -100,23 +90,43 @@
<action android:name="com.google.firebase.MESSAGING_EVENT" /> <action android:name="com.google.firebase.MESSAGING_EVENT" />
</intent-filter> </intent-filter>
</service> </service>
<service
android:name="com.phan_tech.flutter_overlay_apps.OverlayService"
android:exported="false" />
<service
android:name="flutter.overlay.window.flutter_overlay_window.OverlayService"
android:foregroundServiceType="specialUse">
<property
android:name="android.app.PROPERTY_SPECIAL_USE_FGS_SUBTYPE"
android:value="explanation_for_special_use" />
</service>
<receiver
android:name="com.google.firebase.iid.FirebaseInstanceIdReceiver"
android:exported="true"
android:permission="com.google.android.c2dm.permission.SEND">
<intent-filter>
<action android:name="com.google.android.c2dm.intent.RECEIVE" />
<category android:name="com.sefer_driver" />
</intent-filter>
</receiver>
<!-- Sign-In Service -->
<service <service
android:name="com.dsaved.bubblehead.bubble.BubbleHeadService" android:name="com.dsaved.bubblehead.bubble.BubbleHeadService"
android:enabled="true" android:enabled="true"
android:exported="false"> android:exported="false">
<intent-filter> <intent-filter>
<action android:name="intent.bring.app.to.foreground" /> <action android:name="intent.bring.app.to.foreground" />
<category android:name="android.intent.category.DEFAULT" /> <category android:name="android.intent.category.DEFAULT" />
</intent-filter> </intent-filter>
</service> </service>
<!-- <receiver <!-- <receiver
android:name="com.dexterous.flutterlocalnotifications.ScheduledNotificationReceiver" android:name="com.dexterous.flutterlocalnotifications.ScheduledNotificationReceiver"
android:exported="false" /> --> android:exported="false" />
<receiver
<!-- <receiver
android:name="com.dexterous.flutterlocalnotifications.ScheduledNotificationBootReceiver" android:name="com.dexterous.flutterlocalnotifications.ScheduledNotificationBootReceiver"
android:exported="false"> android:exported="false">
<intent-filter> <intent-filter>
@@ -126,7 +136,9 @@
<action android:name="com.htc.intent.action.QUICKBOOT_POWERON" /> <action android:name="com.htc.intent.action.QUICKBOOT_POWERON" />
</intent-filter> </intent-filter>
</receiver> --> </receiver> -->
<receiver
android:name=".YourBroadcastReceiver"
android:exported="false" />
</application> </application>
</manifest> </manifest>

View File

@@ -7,9 +7,9 @@
<string name="channel_description">Notifications from Firebase Cloud Messaging</string> <string name="channel_description">Notifications from Firebase Cloud Messaging</string>
<!-- <string name="app_name">auth_app</string> --> <!-- <string name="app_name">auth_app</string> -->
<string name="facebook_app_id">1749628025888168</string> <!-- <string name="facebook_app_id">1749628025888168</string>
<string name="fb_login_protocol_scheme">fb1749628025888168</string> <string name="fb_login_protocol_scheme">fb1749628025888168</string>
<string name="facebook_client_token">af5af0a2c8feffe25c27755977bb9ff7</string> <string name="facebook_client_token">af5af0a2c8feffe25c27755977bb9ff7</string> -->
</resources> </resources>

View File

@@ -33,7 +33,7 @@
<key>CFBundlePackageType</key> <key>CFBundlePackageType</key>
<string>APPL</string> <string>APPL</string>
<key>CFBundleShortVersionString</key> <key>CFBundleShortVersionString</key>
<string>61</string> <string>62</string>
<key>CFBundleSignature</key> <key>CFBundleSignature</key>
<string>????</string> <string>????</string>
<key>CFBundleURLTypes</key> <key>CFBundleURLTypes</key>
@@ -48,7 +48,7 @@
</dict> </dict>
</array> </array>
<key>CFBundleVersion</key> <key>CFBundleVersion</key>
<string>4.0.61</string> <string>4.0.62</string>
<key>FirebaseAppDelegateProxyEnabled</key> <key>FirebaseAppDelegateProxyEnabled</key>
<string>NO</string> <string>NO</string>
<key>GMSApiKey</key> <key>GMSApiKey</key>

View File

@@ -263,7 +263,7 @@ class RegisterCaptainController extends GetxController {
); );
// Get.snackbar('', ''); // Get.snackbar('', '');
// await smsEgyptController.sendSmsEgypt(phoneNumber, randomNumber.toString()); await smsEgyptController.sendSmsEgypt(phoneNumber, randomNumber.toString());
lastOtpSentTime = DateTime.now(); // Update the last OTP sent time lastOtpSentTime = DateTime.now(); // Update the last OTP sent time
isSent = true; isSent = true;

View File

@@ -1,30 +1,30 @@
import 'package:firebase_auth/firebase_auth.dart'; // import 'package:firebase_auth/firebase_auth.dart';
import 'package:flutter_facebook_auth/flutter_facebook_auth.dart'; // import 'package:flutter_facebook_auth/flutter_facebook_auth.dart';
class FacebookSignIn { // class FacebookSignIn {
Future<UserCredential?> signInWithFacebook() async { // Future<UserCredential?> signInWithFacebook() async {
final LoginResult result = await FacebookAuth.instance.login(); // final LoginResult result = await FacebookAuth.instance.login();
if (result.status == LoginStatus.success) { // if (result.status == LoginStatus.success) {
// Create a credential from the access token // // Create a credential from the access token
final OAuthCredential credential = // final OAuthCredential credential =
FacebookAuthProvider.credential(result.accessToken!.tokenString); // FacebookAuthProvider.credential(result.accessToken!.tokenString);
// Once signed in, return the UserCredential // // Once signed in, return the UserCredential
return await FirebaseAuth.instance.signInWithCredential(credential); // return await FirebaseAuth.instance.signInWithCredential(credential);
} // }
return null; // return null;
} // }
Future<void> signOut() async { // Future<void> signOut() async {
try { // try {
await FacebookAuth.instance.logOut(); // await FacebookAuth.instance.logOut();
print('Facebook Sign Out Successful'); // print('Facebook Sign Out Successful');
} catch (e) { // } catch (e) {
print('Error during Facebook Sign Out: $e'); // print('Error during Facebook Sign Out: $e');
} // }
} // }
Future<bool> isSignedIn() async { // Future<bool> isSignedIn() async {
final accessToken = await FacebookAuth.instance.accessToken; // final accessToken = await FacebookAuth.instance.accessToken;
return accessToken != null; // return accessToken != null;
} // }
} // }

View File

@@ -61,7 +61,7 @@ class NotificationController extends GetxController {
priority: Priority.high, priority: Priority.high,
styleInformation: bigTextStyleInformation, styleInformation: bigTextStyleInformation,
playSound: true, playSound: true,
sound: RawResourceAndroidNotificationSound(tone == '' ? 'ding' : tone), sound: RawResourceAndroidNotificationSound(tone),
// audioAttributesUsage: AudioAttributesUsage.alarm, // audioAttributesUsage: AudioAttributesUsage.alarm,
visibility: NotificationVisibility.public, visibility: NotificationVisibility.public,
autoCancel: false, autoCancel: false,

View File

@@ -328,7 +328,7 @@ class MapDriverController extends GetxController {
double _distance = double _distance =
await calculateDistanceBetweenDriverAndPassengerLocation(); await calculateDistanceBetweenDriverAndPassengerLocation();
if (_distance < 50) { if (_distance < 60) {
changeRideToBeginToPassenger(); changeRideToBeginToPassenger();
isPassengerInfoWindow = false; isPassengerInfoWindow = false;
isRideStarted = true; isRideStarted = true;
@@ -347,6 +347,19 @@ class MapDriverController extends GetxController {
'rideTimeStart': DateTime.now().toString(), 'rideTimeStart': DateTime.now().toString(),
'status': 'Begin', 'status': 'Begin',
}); });
CRUD().post(
link: "${AppLink.seferAlexandriaServer}/rides/update.php",
payload: {
'id': rideId,
'rideTimeStart': DateTime.now().toString(),
'status': 'Begin',
});
CRUD()
.post(link: "${AppLink.seferGizaServer}/rides/update.php", payload: {
'id': rideId,
'rideTimeStart': DateTime.now().toString(),
'status': 'Begin',
});
FirebaseMessagesController().sendNotificationToAnyWithoutData( FirebaseMessagesController().sendNotificationToAnyWithoutData(
'RideIsBegin', 'RideIsBegin',
@@ -586,6 +599,23 @@ class MapDriverController extends GetxController {
'status': 'Finished', 'status': 'Finished',
'price': totalCost, 'price': totalCost,
}); });
CRUD().post(
link: "${AppLink.seferGizaServer}/rides/update.php",
payload: {
'id': rideId,
'rideTimeFinish': DateTime.now().toString(),
'status': 'Finished',
'price': totalCost,
},
);
CRUD().post(
link: "${AppLink.seferAlexandriaServer}/rides/update.php",
payload: {
'id': rideId,
'rideTimeFinish': DateTime.now().toString(),
'status': 'Finished',
'price': totalCost,
});
if (walletChecked == 'true') { if (walletChecked == 'true') {
paymentToken = await generateTokenPassenger( paymentToken = await generateTokenPassenger(
((-1) * double.parse(paymentAmount)).toString()); ((-1) * double.parse(paymentAmount)).toString());
@@ -652,9 +682,11 @@ class MapDriverController extends GetxController {
} }
void cancelCheckRideFromPassenger() async { void cancelCheckRideFromPassenger() async {
var res = await CRUD().get(link: AppLink.getOrderCancelStatus, payload: { var res = await CRUD().get(
'order_id': rideId, link: "${AppLink.endPoint}/ride/driver_order/getOrderCancelStatus.php",
}); //.then((value) { payload: {
'order_id': rideId,
}); //.then((value) {
var response = jsonDecode(res); var response = jsonDecode(res);
canelString = response['data']['status']; canelString = response['data']['status'];
update(); update();
@@ -687,6 +719,7 @@ class MapDriverController extends GetxController {
DateTime currentTime = DateTime.now(); DateTime currentTime = DateTime.now();
void rideIsBeginPassengerTimer() async { void rideIsBeginPassengerTimer() async {
int durationOfRide = int.parse(durationOfRideValue); int durationOfRide = int.parse(durationOfRideValue);
double latePrice = Get.find<HomeCaptainController>().latePrice;
update(); update();
int infinity = 40000; int infinity = 40000;
if (carType == 'Comfort' || if (carType == 'Comfort' ||
@@ -716,60 +749,26 @@ class MapDriverController extends GetxController {
endNameLocation.contains('مطار') || endNameLocation.contains('مطار') ||
endNameLocation.contains('المطار')) { endNameLocation.contains('المطار')) {
price = carType == 'Comfort' // || carType == 'Free Ride' price = carType == 'Comfort' // || carType == 'Free Ride'
? (i ~/ 60) * Get.find<HomeCaptainController>().latePrice + ? price + ((i ~/ 60) - int.parse(duration)) * latePrice
(price) -
int.parse(duration) *
Get.find<HomeCaptainController>().latePrice
// : carType == 'Speed'
// ? (i ~/ 60) +
// (recentDistanceToDash *
// Get.find<HomeCaptainController>().speedPrice)
: carType == 'Lady' : carType == 'Lady'
? (i ~/ 60) * Get.find<HomeCaptainController>().latePrice + ? price + ((i ~/ 60) - int.parse(duration)) * latePrice
(price) -
int.parse(duration) *
Get.find<HomeCaptainController>().latePrice
// : carType == 'Delivery'
// ? (i ~/ 60) +
// (recentDistanceToDash *
// Get.find<HomeCaptainController>().deliveryPrice)
: carType == 'RayehGaiComfort' : carType == 'RayehGaiComfort'
? (i ~/ 60) * ? (i ~/ 60) * latePrice +
Get.find<HomeCaptainController>().latePrice +
(recentDistanceToDash * (recentDistanceToDash *
Get.find<HomeCaptainController>().comfortPrice) Get.find<HomeCaptainController>().comfortPrice)
: (i ~/ 60) * : (i ~/ 60) * latePrice +
Get.find<HomeCaptainController>().latePrice +
(recentDistanceToDash * (recentDistanceToDash *
Get.find<HomeCaptainController>().mashwariPrice); Get.find<HomeCaptainController>().mashwariPrice);
} else if (currentTime.hour >= 21 && currentTime.hour < 0) { } else if (currentTime.hour >= 21 && currentTime.hour < 0) {
price = carType == 'Comfort' // || carType == 'Free Ride' price = carType == 'Comfort' // || carType == 'Free Ride'
? (i ~/ 60) * Get.find<HomeCaptainController>().latePrice + ? price + ((i ~/ 60) - int.parse(duration)) * latePrice
(price) -
int.parse(duration) *
Get.find<HomeCaptainController>().latePrice
// : carType == 'Speed'
// ? (i ~/ 60) +
// (recentDistanceToDash *
// Get.find<HomeCaptainController>().speedPrice)
: carType == 'Lady' : carType == 'Lady'
? (i ~/ 60) * Get.find<HomeCaptainController>().latePrice + ? price + ((i ~/ 60) - int.parse(duration)) * latePrice
(price) -
int.parse(duration) *
Get.find<HomeCaptainController>().latePrice
// : carType == 'Delivery'
// ? (i ~/ 60) +
// (recentDistanceToDash *
// Get.find<HomeCaptainController>().deliveryPrice)
: carType == 'RayehGaiComfort' : carType == 'RayehGaiComfort'
? (i ~/ 60) * ? (i ~/ 60) * latePrice +
Get.find<HomeCaptainController>().latePrice +
(recentDistanceToDash * (recentDistanceToDash *
Get.find<HomeCaptainController>().comfortPrice) Get.find<HomeCaptainController>().comfortPrice)
: (i ~/ 60) * : (i ~/ 60) * latePrice +
Get.find<HomeCaptainController>().latePrice +
(recentDistanceToDash * (recentDistanceToDash *
Get.find<HomeCaptainController>().mashwariPrice); Get.find<HomeCaptainController>().mashwariPrice);
} else if (currentTime.hour >= 1 && currentTime.hour < 5) { } else if (currentTime.hour >= 1 && currentTime.hour < 5) {
@@ -779,51 +778,29 @@ class MapDriverController extends GetxController {
startNameLocation.contains('ملهى ليلي') || startNameLocation.contains('ملهى ليلي') ||
startNameLocation.contains('Night club')) { startNameLocation.contains('Night club')) {
price = carType == 'Comfort' // || carType == 'Free Ride' price = carType == 'Comfort' // || carType == 'Free Ride'
? (i ~/ 60) * ? (i ~/ 60) * (latePrice + .5) * 2 +
(Get.find<HomeCaptainController>().latePrice + .5) *
2 +
(price) - (price) -
int.parse(duration) * int.parse(duration) * (latePrice + .5) * 2
(Get.find<HomeCaptainController>().latePrice + .5) *
2
: carType == 'Lady' : carType == 'Lady'
? (i ~/ 60) * ? (i ~/ 60) * (latePrice + .5) * 2 +
(Get.find<HomeCaptainController>().latePrice + .5) *
2 +
(price) - (price) -
int.parse(duration) * int.parse(duration) * (latePrice + .5) * 2
(Get.find<HomeCaptainController>().latePrice + .5) *
2
: carType == 'RayehGaiComfort' : carType == 'RayehGaiComfort'
? (i ~/ 60) * ? (i ~/ 60) * (latePrice + .5) * 2 + (price)
(Get.find<HomeCaptainController>().latePrice + : (i ~/ 60) * (latePrice + .5) * 2 + (price);
.5) *
2 +
(price)
: (i ~/ 60) *
(Get.find<HomeCaptainController>().latePrice +
.5) *
2 +
(price);
} }
price = carType == 'Comfort' // || carType == 'Free Ride' price = carType == 'Comfort' // || carType == 'Free Ride'
? (i ~/ 60) * (Get.find<HomeCaptainController>().latePrice + .5) + ? (i ~/ 60) * (latePrice + .5) +
(price) - (price) -
int.parse(duration) * int.parse(duration) * (latePrice + .5)
(Get.find<HomeCaptainController>().latePrice + .5)
: carType == 'Lady' : carType == 'Lady'
? (i ~/ 60) * ? (i ~/ 60) * (latePrice + .5) +
(Get.find<HomeCaptainController>().latePrice + .5) +
(price) - (price) -
int.parse(duration) * int.parse(duration) * (latePrice + .5)
(Get.find<HomeCaptainController>().latePrice + .5)
: carType == 'RayehGaiComfort' : carType == 'RayehGaiComfort'
? (i ~/ 60) * ? (i ~/ 60) * (latePrice + .5) +
(Get.find<HomeCaptainController>().latePrice +
.5) +
(price) - (price) -
int.parse(duration) * int.parse(duration) * (latePrice + .5)
(Get.find<HomeCaptainController>().latePrice + .5)
: price; : price;
} else if (currentTime.hour >= 14 && currentTime.hour <= 17) { } else if (currentTime.hour >= 14 && currentTime.hour <= 17) {
price = carType == 'Comfort' // || carType == 'Free Ride' price = carType == 'Comfort' // || carType == 'Free Ride'

View File

@@ -7,7 +7,6 @@ import 'package:SEFER/views/home/Captin/orderCaptin/order_request_page.dart';
import 'package:firebase_core/firebase_core.dart'; import 'package:firebase_core/firebase_core.dart';
import 'package:firebase_messaging/firebase_messaging.dart'; import 'package:firebase_messaging/firebase_messaging.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_facebook_auth/flutter_facebook_auth.dart';
import 'package:flutter_overlay_window/flutter_overlay_window.dart'; import 'package:flutter_overlay_window/flutter_overlay_window.dart';
import 'package:flutter_secure_storage/flutter_secure_storage.dart'; import 'package:flutter_secure_storage/flutter_secure_storage.dart';
import 'package:flutter_stripe/flutter_stripe.dart'; import 'package:flutter_stripe/flutter_stripe.dart';
@@ -110,14 +109,7 @@ void main() async {
await GetStorage.init(); await GetStorage.init();
Stripe.publishableKey = AK.publishableKeyStripe; Stripe.publishableKey = AK.publishableKeyStripe;
// Request location permission
// PermissionStatus status = await Permission.location.request();
// if (status.isDenied) {
// WidgetsBinding.instance.addPostFrameCallback((_) {
// getPermissionLocation();
// });
// return;
// }
PermissionStatus status1 = await Permission.location.status; PermissionStatus status1 = await Permission.location.status;
if (status1.isGranted) { if (status1.isGranted) {
await LocationController().startLocationUpdates(); await LocationController().startLocationUpdates();
@@ -130,7 +122,7 @@ void main() async {
await FirebaseMessagesController().requestFirebaseMessagingPermission(); await FirebaseMessagesController().requestFirebaseMessagingPermission();
FirebaseMessaging.onBackgroundMessage(backgroundMessageHandler); FirebaseMessaging.onBackgroundMessage(backgroundMessageHandler);
// NotificationController1().initNotifications(); NotificationController().initNotifications();
NotificationController().initNotifications(); NotificationController().initNotifications();
await Future.wait([ await Future.wait([

View File

@@ -177,129 +177,129 @@ GetBuilder<HomeCaptainController> leftMainMenuCaptainIcons() {
), ),
), ),
), ),
// AnimatedContainer( AnimatedContainer(
// duration: const Duration(microseconds: 200), duration: const Duration(microseconds: 200),
// width: controller.widthMapTypeAndTraffic, width: controller.widthMapTypeAndTraffic,
// decoration: BoxDecoration( decoration: BoxDecoration(
// color: AppColor.secondaryColor, color: AppColor.secondaryColor,
// border: Border.all(color: AppColor.blueColor), border: Border.all(color: AppColor.blueColor),
// borderRadius: BorderRadius.circular(15)), borderRadius: BorderRadius.circular(15)),
// child: Builder(builder: (context) { child: Builder(builder: (context) {
// return IconButton( return IconButton(
// onPressed: () async { onPressed: () async {
// // Get.to(() => EgyptCardAI()); // Get.to(() => EgyptCardAI());
// // print(box.read(BoxName.myList)); // print(box.read(BoxName.myList));
// List<String> d = [ List<String> d = [
// "30.003028,31.2419628", "30.003028,31.2419628",
// "30.0955661,31.2665336", "30.0955661,31.2665336",
// "160.00", "160.00",
// "25.92", "25.92",
// "1488", "1488",
// "16.93", "16.93",
// "114243034311436865474", "114243034311436865474",
// "113172279072358305645", "113172279072358305645",
// "hamza ayed", "hamza ayed",
// "rlMbi4Hc8L1STMPE99iPKqK4Gddwv8r9qZOCadsz9qTEJZ6KLEE9ruTJI6N8dKfK4CXez5pme5WIs14-1QGo29s07fQOniZgIlJV5XFL3yqzPRSUmn3", "rlMbi4Hc8L1STMPE99iPKqK4Gddwv8r9qZOCadsz9qTEJZ6KLEE9ruTJI6N8dKfK4CXez5pme5WIs14-1QGo29s07fQOniZgIlJV5XFL3yqzPRSUmn3",
// "+201023248456", "+201023248456",
// "1 min", "1 min",
// "1 m", "1 m",
// "false", "false",
// "QwUMoyUtZ0J3oR6yXKUavrB_gBl9npUZe-qZtax-Raq4QBbdKv0AmtLKm0BfBd6N_592HBv4CVa41ii4122W3hr-BCUKKzJhzZcK8m0YjbWbtpvgJRD8uD_nuMk9", "QwUMoyUtZ0J3oR6yXKUavrB_gBl9npUZe-qZtax-Raq4QBbdKv0AmtLKm0BfBd6N_592HBv4CVa41ii4122W3hr-BCUKKzJhzZcK8m0YjbWbtpvgJRD8uD_nuMk9",
// "0", "0",
// "238", "238",
// "false", "false",
// "114243034311436865474", "114243034311436865474",
// "1488", "1488",
// "startEnd", "startEnd",
// "30.049307749732176,31.274291574954987", "30.049307749732176,31.274291574954987",
// "", "",
// "", "",
// "", "",
// "", "",
// "17.73", "17.73",
// "0", "0",
// "hamzaayedflutter@gmail.com", "hamzaayedflutter@gmail.com",
// "الفسطاط، حي مصر القديمة، مصر", "الفسطاط، حي مصر القديمة، مصر",
// " الزاوية الحمراء، محافظة القاهرة، مصر", " الزاوية الحمراء، محافظة القاهرة، مصر",
// "Speed", "Speed",
// "8", "8",
// "5.00" "5.00"
// ]; ];
// FirebaseMessagesController().sendNotificationToDriverMAP( FirebaseMessagesController().sendNotificationToDriverMAP(
// 'Order'.tr, 'Order'.tr,
// 'from: ', 'from: ',
// // jsonDecode(value)['message'].toString(), // jsonDecode(value)['message'].toString(),
// 'dUEVBJDPQfKiMuGgDjdyfX:APA91bE3DKYAYs3LIxGmzy55-ojLAZWv0ym4a9Zy9UxdkyRUOgQP8bf1WwU9LJAof0DjfaIxciVYPnue7EdwhujzQe67SImfOF9yI1YgGsKLDH6yo6FsFaAYpsbrSCqlaoRp14lLqymi', 'fKBBB4_1R0q18-byySHUeG:APA91bHk2RmjjMt6eKr7KQnqh4CK02yW3H5E8g_beVcQFgiCG50j9KCtSU1O8PtvS_gA5xuJLhaorDV9AeslcyLFJFf302tICKMiKgsDP5pWkF5WXNw0-4NsoD-BnJxf0-Do9Vs1Zbpq',
// d, d,
// 'order.wav'); 'order.wav');
// // NotificationController() // NotificationController()
// // .showNotification('VIP Order'.tr, '', 'order', ''); // .showNotification('VIP Order'.tr, '', 'order', '');
// // try {} catch (e) { // try {} catch (e) {
// // print('Error showing overlay: $e'); // print('Error showing overlay: $e');
// // } // }
// // final Bubble _bubble = Bubble(showCloseButton: true); // final Bubble _bubble = Bubble(showCloseButton: true);
// // try { // try {
// // await _bubble.startBubbleHead(sendAppToBackground: false); // await _bubble.startBubbleHead(sendAppToBackground: false);
// // } on PlatformException { // } on PlatformException {
// // print('Failed to call startBubbleHead'); // print('Failed to call startBubbleHead');
// // } // }
// // Bubble().startBubbleHead(sendAppToBackground: true); // Bubble().startBubbleHead(sendAppToBackground: true);
// // } // }
// // Future<void> stopBubbleHead() async { // Future<void> stopBubbleHead() async {
// // try { // try {
// // await _bubble.stopBubbleHead(); // await _bubble.stopBubbleHead();
// // } on PlatformException { // } on PlatformException {
// // print('Failed to call stopBubbleHead'); // print('Failed to call stopBubbleHead');
// // } // }
// // } // }
// // //
// // // // send data to ovelay // // // send data to ovelay
// }, },
// icon: const Icon( icon: const Icon(
// FontAwesome5.grin_tears, FontAwesome5.grin_tears,
// size: 29, size: 29,
// color: AppColor.blueColor, color: AppColor.blueColor,
// ), ),
// ); );
// }), }),
// ), ),
// AnimatedContainer( AnimatedContainer(
// duration: const Duration(microseconds: 200), duration: const Duration(microseconds: 200),
// width: controller.widthMapTypeAndTraffic, width: controller.widthMapTypeAndTraffic,
// decoration: BoxDecoration( decoration: BoxDecoration(
// color: AppColor.secondaryColor, color: AppColor.secondaryColor,
// border: Border.all(color: AppColor.blueColor), border: Border.all(color: AppColor.blueColor),
// borderRadius: BorderRadius.circular(15)), borderRadius: BorderRadius.circular(15)),
// child: Builder(builder: (context) { child: Builder(builder: (context) {
// return IconButton( return IconButton(
// onPressed: () async { onPressed: () async {
// // FirebaseMessagesController().sendNotificationToAnyWithoutData( // FirebaseMessagesController().sendNotificationToAnyWithoutData(
// 'Order'.tr, // 'Order'.tr,
// 'from: ', // 'from: ',
// // jsonDecode(value)['message'].toString(), // // jsonDecode(value)['message'].toString(),
// 'dqK5wNrPTr20HQ8qa5KsgL:APA91bHwPW_XzCIxQtg_IkJmHg1JRd8NRMquvsgedBaHAIgErTs6Uzpw1IX0EIJqkTaZq5dxd1u2z7NVdLlvcmEzrpjjWt1pUsZaa5UU7Cpx6hUzJMUdXvhNlAYFGklM8bWUG4ZXSRf1', // 'fKBBB4_1R0q18-byySHUeG:APA91bHk2RmjjMt6eKr7KQnqh4CK02yW3H5E8g_beVcQFgiCG50j9KCtSU1O8PtvS_gA5xuJLhaorDV9AeslcyLFJFf302tICKMiKgsDP5pWkF5WXNw0-4NsoD-BnJxf0-Do9Vs1Zbpq',
// 'order.wav'); // 'order.wav');
// NotificationController1().showNotification( // NotificationController1().showNotification(
// 'sdf'.tr, // 'sdf'.tr,
// 'We regret to inform you that another driver has accepted this order.' // 'We regret to inform you that another driver has accepted this order.'
// .tr, // .tr,
// '', // '',
// ''); // '');
// requestLocationPermission(); // requestLocationPermission();
// Get.to(() => LoginCaptin()); Get.to(() => SmsSignupEgypt());
// print(box.read(BoxName.tokenDriver)); print(box.read(BoxName.tokenDriver));
// }, },
// icon: const Icon( icon: const Icon(
// FontAwesome5.closed_captioning, FontAwesome5.closed_captioning,
// size: 29, size: 29,
// color: AppColor.blueColor, color: AppColor.blueColor,
// ), ),
// ); );
// }), }),
// ), ),
], ],
)), )),
); );

View File

@@ -7,7 +7,6 @@ import Foundation
import audio_session import audio_session
import device_info_plus import device_info_plus
import facebook_auth_desktop
import file_selector_macos import file_selector_macos
import firebase_auth import firebase_auth
import firebase_core import firebase_core
@@ -32,7 +31,6 @@ import wakelock_plus
func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) { func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
AudioSessionPlugin.register(with: registry.registrar(forPlugin: "AudioSessionPlugin")) AudioSessionPlugin.register(with: registry.registrar(forPlugin: "AudioSessionPlugin"))
DeviceInfoPlusMacosPlugin.register(with: registry.registrar(forPlugin: "DeviceInfoPlusMacosPlugin")) DeviceInfoPlusMacosPlugin.register(with: registry.registrar(forPlugin: "DeviceInfoPlusMacosPlugin"))
FacebookAuthDesktopPlugin.register(with: registry.registrar(forPlugin: "FacebookAuthDesktopPlugin"))
FileSelectorPlugin.register(with: registry.registrar(forPlugin: "FileSelectorPlugin")) FileSelectorPlugin.register(with: registry.registrar(forPlugin: "FileSelectorPlugin"))
FLTFirebaseAuthPlugin.register(with: registry.registrar(forPlugin: "FLTFirebaseAuthPlugin")) FLTFirebaseAuthPlugin.register(with: registry.registrar(forPlugin: "FLTFirebaseAuthPlugin"))
FLTFirebaseCorePlugin.register(with: registry.registrar(forPlugin: "FLTFirebaseCorePlugin")) FLTFirebaseCorePlugin.register(with: registry.registrar(forPlugin: "FLTFirebaseCorePlugin"))

View File

@@ -409,14 +409,6 @@ packages:
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "2.0.5" version: "2.0.5"
facebook_auth_desktop:
dependency: transitive
description:
name: facebook_auth_desktop
sha256: "219d559a33891e937c1913430505eae01fb946cb35729167bbdc747e3ebbd9ff"
url: "https://pub.dev"
source: hosted
version: "2.1.1"
fake_async: fake_async:
dependency: transitive dependency: transitive
description: description:
@@ -582,30 +574,6 @@ packages:
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "1.1.8" version: "1.1.8"
flutter_facebook_auth:
dependency: "direct main"
description:
name: flutter_facebook_auth
sha256: faa92fb7626c230837f30d02de7d92b6af334b77ba744867c63545d4ad7e171f
url: "https://pub.dev"
source: hosted
version: "7.1.0"
flutter_facebook_auth_platform_interface:
dependency: transitive
description:
name: flutter_facebook_auth_platform_interface
sha256: e04b8dbfa77702bea45a79993163ad5d20b2c0084109bec591fdc2b9ee505779
url: "https://pub.dev"
source: hosted
version: "6.1.2"
flutter_facebook_auth_web:
dependency: transitive
description:
name: flutter_facebook_auth_web
sha256: "8a6890a98522604169ca9f958d7189c9f579dbf05ba4d3d7adf26eca4c4c4c93"
url: "https://pub.dev"
source: hosted
version: "6.1.1"
flutter_font_icons: flutter_font_icons:
dependency: "direct main" dependency: "direct main"
description: description:

View File

@@ -85,10 +85,6 @@ dependencies:
flutter_contacts: ^1.1.8 flutter_contacts: ^1.1.8
flutter_overlay_window: ^0.4.4 flutter_overlay_window: ^0.4.4
googleapis_auth: ^1.6.0 googleapis_auth: ^1.6.0
flutter_facebook_auth: ^7.1.0
# dash_bubble: ^2.0.0
# bubble_head: ^0.0.4
# google_mlkit_face_detection: ^0.11.0
dev_dependencies: dev_dependencies:
flutter_test: flutter_test: