10/10/1
This commit is contained in:
@@ -8,8 +8,8 @@ import 'package:ride/constant/colors.dart';
|
||||
import 'package:ride/constant/style.dart';
|
||||
import 'package:ride/controller/functions/crud.dart';
|
||||
import 'package:ride/controller/functions/launch.dart';
|
||||
import 'package:ride/controller/home/captin/map_dirction.dart';
|
||||
import 'package:ride/controller/home/map_page_controller.dart';
|
||||
import 'package:ride/controller/home/captin/map_driver_controller.dart';
|
||||
import 'package:ride/controller/home/map_passenger_controller.dart';
|
||||
import 'package:ride/views/home/profile/promos_passenger_page.dart';
|
||||
import 'package:ride/views/widgets/elevated_btn.dart';
|
||||
|
||||
@@ -27,13 +27,6 @@ class FirebaseMessagesController extends GetxController {
|
||||
late String driverID;
|
||||
late String driverToken;
|
||||
NotificationSettings? notificationSettings;
|
||||
@override
|
||||
void onInit() async {
|
||||
super.onInit();
|
||||
// getNotificationSettings();
|
||||
// getToken();
|
||||
// await getTokens();
|
||||
}
|
||||
|
||||
Future<void> getNotificationSettings() async {
|
||||
// Get the current notification settings
|
||||
@@ -187,15 +180,22 @@ class FirebaseMessagesController extends GetxController {
|
||||
);
|
||||
} else if (message.notification!.title!.contains('Promo')) {
|
||||
Get.to(const PromosPassengerPage());
|
||||
} else if (message.notification!.title!
|
||||
.contains('DriverIsGoingToPassenger')) {
|
||||
Get.snackbar('Driver is Going To Passenger', '',
|
||||
backgroundColor: AppColor.greenColor);
|
||||
} else if (message.notification!.title!.contains('RideIsBegin')) {
|
||||
// MapDirection mapDirection = Get.find<MapDirection>();
|
||||
// mapDirection.clearPolyline();
|
||||
print('jjjjjjjjjjjjjjjjjjjjjjjjjjj');
|
||||
Get.defaultDialog(
|
||||
title: 'The Ride is Begin'.tr,
|
||||
backgroundColor: AppColor.greenColor,
|
||||
);
|
||||
MapDirection().clearPolyline();
|
||||
// MapPassengerController mapController = Get.put(MapPassengerController());
|
||||
Get.snackbar('RideIsBegin', '', backgroundColor: AppColor.greenColor);
|
||||
// mapController.driverArrivePassenger();
|
||||
update();
|
||||
} else if (message.notification!.title!.contains('isRideFinished')) {
|
||||
MapPassengerController mapController =
|
||||
Get.find<MapPassengerController>();
|
||||
Get.snackbar('Ride Finished'.tr, '',
|
||||
backgroundColor: AppColor.greenColor);
|
||||
mapController.isRideFinished = true;
|
||||
update();
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -305,7 +305,8 @@ class FirebaseMessagesController extends GetxController {
|
||||
var passengerList = message.data['passengerList'];
|
||||
print(passengerList);
|
||||
print('9999999999999my Apply Ride 999999999999999');
|
||||
MapController mapController = Get.find<MapController>();
|
||||
MapPassengerController mapController =
|
||||
Get.find<MapPassengerController>();
|
||||
mapController.rideConfirm = false;
|
||||
update();
|
||||
print('-----------------------------rideConfirm===' +
|
||||
@@ -382,7 +383,7 @@ class FirebaseMessagesController extends GetxController {
|
||||
title: 'The Ride is Begin'.tr,
|
||||
backgroundColor: AppColor.greenColor,
|
||||
);
|
||||
MapDirection().clearPolyline();
|
||||
MapDriverController().clearPolyline();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user