3/21/2
This commit is contained in:
@@ -243,6 +243,12 @@ class FirebaseMessagesController extends GetxController {
|
||||
// 'PolylineJson': myPoints,
|
||||
'body': message.notification!.body
|
||||
});
|
||||
} else if (message.notification!.title! == 'Order Applied') {
|
||||
NotificationController().showNotification(
|
||||
'The order Accepted by another Driver'.tr,
|
||||
'We regret to inform you that another driver has accepted this order.'
|
||||
.tr,
|
||||
'order');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -650,8 +650,16 @@ update ui for totla results
|
||||
// Add a new marker with the ID `MyLocation` at the current location of the user.
|
||||
LocationController locationController = Get.find<LocationController>();
|
||||
myLocation = locationController.myLocation;
|
||||
final previousLocationOfDrivers = await sql.getCustomQuery(
|
||||
'Select * from ${TableName.carLocations} where order_id =$rideId Order by created_at DESC limit 1');
|
||||
final previousLocationOfDrivers = await sql.getCustomQuery('''SELECT
|
||||
*
|
||||
FROM
|
||||
${TableName.carLocations}
|
||||
WHERE
|
||||
order_id = $rideId
|
||||
ORDER BY
|
||||
created_at DESC
|
||||
LIMIT
|
||||
1''');
|
||||
|
||||
//get from sql
|
||||
if (previousLocationOfDrivers.isNotEmpty) {
|
||||
|
||||
@@ -924,20 +924,8 @@ class MapPassengerController extends GetxController {
|
||||
}
|
||||
|
||||
delayAndFetchRideStatus(rideId);
|
||||
// if (shouldFetch == false) {
|
||||
// startTimer();
|
||||
// update();
|
||||
// }
|
||||
|
||||
update();
|
||||
// } else {
|
||||
// Get.defaultDialog(
|
||||
// title: 'No Car or Driver Found in your area.'.tr,
|
||||
// titleStyle: AppStyle.title,
|
||||
// middleText: 'Please Try anther time '.tr,
|
||||
// middleTextStyle: AppStyle.title.copyWith(color: AppColor.yellowColor),
|
||||
// confirm:
|
||||
// MyElevatedButton(title: 'Ok'.tr, onPressed: () => Get.back()));
|
||||
// }
|
||||
}
|
||||
|
||||
String statusRide = 'wait';
|
||||
@@ -949,8 +937,8 @@ class MapPassengerController extends GetxController {
|
||||
.get(link: AppLink.getRideStatus, payload: {'id': rideId});
|
||||
print(res);
|
||||
var decod = jsonDecode(res);
|
||||
print(' 0000000000000000000000000000000000000000000000000');
|
||||
print(decod['data']);
|
||||
// print(' 0000000000000000000000000000000000000000000000000');
|
||||
// print(decod['data']);
|
||||
if (decod['data'].toString() == 'Apply') {
|
||||
getUpdatedRideForDriverApply(rideId);
|
||||
shouldFetch = false; // Stop further fetches
|
||||
@@ -965,37 +953,12 @@ class MapPassengerController extends GetxController {
|
||||
confirmRideForAllDriverAvailable();
|
||||
isDriversTokensSend = true;
|
||||
}
|
||||
// else{
|
||||
// j
|
||||
// }
|
||||
// else {
|
||||
// Get.defaultDialog(
|
||||
// barrierDismissible: false,
|
||||
// title: 'There no Driver Aplly your order sorry for that '.tr,
|
||||
// // middleText: 'try next time .'.tr,
|
||||
// content: IconButton(
|
||||
// onPressed: () {
|
||||
// textToSpeechController.speakText(
|
||||
// 'There no Driver Aplly your order sorry for that '.tr);
|
||||
// },
|
||||
// icon: const Icon(
|
||||
// Icons.headphones,
|
||||
// size: 40,
|
||||
// ),
|
||||
// ),
|
||||
// titleStyle: AppStyle.title,
|
||||
// confirm: MyElevatedButton(
|
||||
// title: 'Back',
|
||||
// onPressed: () => Get.offAll(const MapPagePassenger()),
|
||||
// ));
|
||||
|
||||
// cancelRideAfterRejectFromAll();
|
||||
// }
|
||||
} else {
|
||||
delayAndFetchRideStatus(
|
||||
rideId); // Repeat the delay and fetch operation
|
||||
update();
|
||||
}
|
||||
// else if (isDriversTokensSend == false) {
|
||||
// delayAndFetchRideStatus(
|
||||
// rideId); // Repeat the delay and fetch operation
|
||||
// update();
|
||||
// }
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -386,6 +386,8 @@ class MyTranslation extends Translations {
|
||||
'Total price from ': 'المبلغ المطلوب من ',
|
||||
'Order Details Speed': 'طلب سريع',
|
||||
'Order Applied': "نفذ الطلب",
|
||||
'We regret to inform you that another driver has accepted this order.':
|
||||
'نأسف لإبلاغك بأن سائقًا آخر قد قبل هذا الطلب',
|
||||
"The order has been accepted by another driver.":
|
||||
'الطلب اتاخد من سواق تاني.',
|
||||
"Be more mindful next time to avoid dropping orders.":
|
||||
|
||||
@@ -49,10 +49,10 @@ class CustomSliderOnBoarding extends GetView<OnBoardingControllerImp> {
|
||||
Image.asset(
|
||||
onBoardingList[i].image!,
|
||||
// width: ,
|
||||
height: Get.width / 1.3,
|
||||
height: Get.width / 2,
|
||||
fit: BoxFit.fill,
|
||||
),
|
||||
const SizedBox(height: 60),
|
||||
const SizedBox(height: 20),
|
||||
Text(onBoardingList[i].title!,
|
||||
textAlign: TextAlign.center,
|
||||
style: const TextStyle(
|
||||
|
||||
@@ -27,35 +27,35 @@ class RatePassenger extends StatelessWidget {
|
||||
decoration: AppStyle.boxDecoration,
|
||||
child: Column(
|
||||
children: [
|
||||
Padding(
|
||||
padding: const EdgeInsets.all(4),
|
||||
child: Container(
|
||||
height: Get.height * .25,
|
||||
decoration: AppStyle.boxDecoration1,
|
||||
child: Column(
|
||||
children: [
|
||||
Text(
|
||||
'${'Total price from '.tr}${Get.find<MapDriverController>().passengerName}',
|
||||
style: AppStyle.title,
|
||||
),
|
||||
Container(
|
||||
decoration: BoxDecoration(
|
||||
border: Border.all(
|
||||
width: 2,
|
||||
color: AppColor.greenColor,
|
||||
)),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(4),
|
||||
child: Text(
|
||||
Get.find<MapDriverController>()
|
||||
.totalPassenger,
|
||||
style: AppStyle.number,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
)),
|
||||
),
|
||||
// Padding(
|
||||
// padding: const EdgeInsets.all(4),
|
||||
// child: Container(
|
||||
// height: Get.height * .25,
|
||||
// decoration: AppStyle.boxDecoration1,
|
||||
// child: Column(
|
||||
// children: [
|
||||
// Text(
|
||||
// '${'Total price from '.tr}${Get.find<MapDriverController>().passengerName}',
|
||||
// style: AppStyle.title,
|
||||
// ),
|
||||
// Container(
|
||||
// decoration: BoxDecoration(
|
||||
// border: Border.all(
|
||||
// width: 2,
|
||||
// color: AppColor.greenColor,
|
||||
// )),
|
||||
// child: Padding(
|
||||
// padding: const EdgeInsets.all(4),
|
||||
// child: Text(
|
||||
// Get.find<MapDriverController>()
|
||||
// .totalPassenger,
|
||||
// style: AppStyle.number,
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
// ],
|
||||
// )),
|
||||
// ),
|
||||
Center(
|
||||
child: RatingBar.builder(
|
||||
initialRating: 0,
|
||||
|
||||
@@ -18,7 +18,7 @@ GetBuilder<MapDriverController> driverEndRideBar() {
|
||||
height: mapDriverController.remainingTimeTimerRideBegin < 60
|
||||
? mapDriverController.driverEndPage = 160
|
||||
: 100,
|
||||
width: 200,
|
||||
width: 240,
|
||||
child: Column(
|
||||
children: [
|
||||
Row(
|
||||
@@ -53,6 +53,14 @@ GetBuilder<MapDriverController> driverEndRideBar() {
|
||||
),
|
||||
],
|
||||
),
|
||||
Row(
|
||||
children: [
|
||||
Text(mapDriverController.recentAngelToMarker
|
||||
.toStringAsFixed(0)),
|
||||
Text(mapDriverController.recentDistanceToDash
|
||||
.toStringAsFixed(0))
|
||||
],
|
||||
),
|
||||
mapDriverController.remainingTimeTimerRideBegin < 60
|
||||
? Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
|
||||
@@ -320,15 +320,15 @@ class CountryPicker extends StatelessWidget {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return GetBuilder<ProfileController>(builder: (controller) {
|
||||
return Column(
|
||||
return ListView(
|
||||
children: [
|
||||
const SizedBox(
|
||||
height: 20,
|
||||
),
|
||||
Text("Select Your Country".tr),
|
||||
const SizedBox(
|
||||
height: 20,
|
||||
),
|
||||
// const SizedBox(
|
||||
// height: 20,
|
||||
// ),
|
||||
Padding(
|
||||
padding: const EdgeInsets.all(10),
|
||||
child: Text(
|
||||
@@ -336,7 +336,7 @@ class CountryPicker extends StatelessWidget {
|
||||
.tr),
|
||||
),
|
||||
SizedBox(
|
||||
height: 300,
|
||||
height: 200,
|
||||
child: CupertinoPicker(
|
||||
itemExtent: 32,
|
||||
onSelectedItemChanged: (int index) {
|
||||
|
||||
Reference in New Issue
Block a user