4/2/6
This commit is contained in:
@@ -104,14 +104,14 @@ class MapDriverController extends GetxController {
|
||||
myLocation = myLocation;
|
||||
mapController = controller;
|
||||
controller.getVisibleRegion();
|
||||
controller.animateCamera(
|
||||
CameraUpdate.newLatLng(myLocation),
|
||||
);
|
||||
update();
|
||||
|
||||
// Set up a timer or interval to trigger the marker update every 3 seconds.
|
||||
timer = Timer.periodic(const Duration(seconds: 1), (_) {
|
||||
updateMarker();
|
||||
controller.animateCamera(
|
||||
CameraUpdate.newLatLng(myLocation),
|
||||
);
|
||||
update();
|
||||
});
|
||||
}
|
||||
|
||||
@@ -534,7 +534,7 @@ class MapDriverController extends GetxController {
|
||||
// Get.back();
|
||||
}
|
||||
|
||||
void cancelCheckRidefromPassenger() async {
|
||||
void cancelCheckRideFromPassenger() async {
|
||||
var res = await CRUD().get(link: AppLink.getOrderCancelStatus, payload: {
|
||||
'order_id': rideId,
|
||||
}); //.then((value) {
|
||||
@@ -626,7 +626,7 @@ class MapDriverController extends GetxController {
|
||||
markers.add(
|
||||
Marker(
|
||||
markerId: MarkerId('MyLocation'.tr),
|
||||
position: locationController.myLocation,
|
||||
position: myLocation,
|
||||
draggable: true,
|
||||
icon: carIcon,
|
||||
rotation: locationController.heading,
|
||||
@@ -637,7 +637,7 @@ class MapDriverController extends GetxController {
|
||||
);
|
||||
|
||||
mapController!.animateCamera(
|
||||
CameraUpdate.newLatLng(locationController.myLocation),
|
||||
CameraUpdate.newLatLng(myLocation),
|
||||
);
|
||||
update();
|
||||
}
|
||||
|
||||
@@ -627,6 +627,7 @@ class MapPassengerController extends GetxController {
|
||||
update();
|
||||
// isCancelRidePageShown = true;
|
||||
rideIsBeginPassengerTimer();
|
||||
runWhenRideIsBegin();
|
||||
// //print('rideTimerBegin: $rideTimerBegin');
|
||||
}
|
||||
} catch (e) {
|
||||
@@ -670,7 +671,7 @@ class MapPassengerController extends GetxController {
|
||||
// isCancelRidePageShown = true;
|
||||
update();
|
||||
rideIsBeginPassengerTimer();
|
||||
runWhenRideIsBegin();
|
||||
// runWhenRideIsBegin();
|
||||
}
|
||||
|
||||
void cancelTimerToPassengerFromDriverAfterApplied() {
|
||||
@@ -1658,7 +1659,7 @@ class MapPassengerController extends GetxController {
|
||||
// });
|
||||
// }
|
||||
|
||||
Future startMarkerReloading() async {
|
||||
startMarkerReloading() async {
|
||||
int reloadCount = 0;
|
||||
|
||||
Timer.periodic(const Duration(seconds: 2), (timer) {
|
||||
@@ -2344,7 +2345,7 @@ class MapPassengerController extends GetxController {
|
||||
await getLocation();
|
||||
await addToken();
|
||||
await getKazanPercent();
|
||||
await startMarkerReloading();
|
||||
startMarkerReloading();
|
||||
// await getCarsLocationByPassenger();
|
||||
// await getNearestDriverByPassengerLocation();
|
||||
addCustomPicker();
|
||||
|
||||
@@ -632,7 +632,8 @@ class MyTranslation extends Translations {
|
||||
'created time': "وقت الرحله",
|
||||
'Speed Over': 'سرعة عالية',
|
||||
'I will slow down': 'حاضر هخفف',
|
||||
'Map Passenger': 'خارطه الراكب',"Be Slowly": "خفف شوية من السرعة",
|
||||
'Map Passenger': 'خارطه الراكب',
|
||||
"Be Slowly": "خفف شوية من السرعة",
|
||||
"If you want to make Google Map App run directly when you apply order":
|
||||
"إذا كنت تريد أن تفتح تطبيق خرائط جوجل مباشرة عند طلب الخدمة",
|
||||
"You can change the language of the app": "يمكنك تغيير لغة التطبيق",
|
||||
|
||||
@@ -65,8 +65,8 @@ GetBuilder<MapDriverController> driverEndRideBar() {
|
||||
Text(mapDriverController.rideTimerFromBegin
|
||||
.toStringAsFixed(0)),
|
||||
const Icon(Icons.location_on),
|
||||
Text(mapDriverController.recentDistanceToDash
|
||||
.toStringAsFixed(0)),
|
||||
Text(
|
||||
'${mapDriverController.recentDistanceToDash.toStringAsFixed(0)} ${'KM'.tr}'),
|
||||
const Icon(Icons.attach_money),
|
||||
Text(mapDriverController.price.toStringAsFixed(0)),
|
||||
],
|
||||
@@ -85,8 +85,7 @@ GetBuilder<MapDriverController> driverEndRideBar() {
|
||||
],
|
||||
)
|
||||
: const SizedBox(),
|
||||
mapDriverController.remainingTimeTimerRideBegin < 60 &&
|
||||
mapDriverController.carType != 'Free Ride'
|
||||
mapDriverController.remainingTimeTimerRideBegin < 60
|
||||
? Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
|
||||
@@ -42,8 +42,8 @@ class SosConnect extends StatelessWidget {
|
||||
child: MyTextForm(
|
||||
controller: mapDriverController
|
||||
.sosEmergincyNumberCotroller,
|
||||
label: 'Insert Emergincy Number'.tr,
|
||||
hint: 'Insert Emergincy Number'.tr,
|
||||
label: 'Insert Emergency Number'.tr,
|
||||
hint: 'Insert Emergency Number'.tr,
|
||||
type: TextInputType.phone),
|
||||
),
|
||||
confirm: MyElevatedButton(
|
||||
@@ -73,14 +73,14 @@ class SosConnect extends StatelessWidget {
|
||||
onTap: () {
|
||||
if (box.read(BoxName.sosPhoneDriver) == null) {
|
||||
Get.defaultDialog(
|
||||
title: 'Insert Emergincy Number'.tr,
|
||||
title: 'Insert Emergency Number'.tr,
|
||||
content: Form(
|
||||
key: mapDriverController.formKey1,
|
||||
child: MyTextForm(
|
||||
controller: mapDriverController
|
||||
.sosEmergincyNumberCotroller,
|
||||
label: 'Insert Emergincy Number'.tr,
|
||||
hint: 'Insert Emergincy Number'.tr,
|
||||
label: 'Insert Emergency Number'.tr,
|
||||
hint: 'Insert Emergency Number'.tr,
|
||||
type: TextInputType.phone),
|
||||
),
|
||||
confirm: MyElevatedButton(
|
||||
@@ -99,7 +99,7 @@ class SosConnect extends StatelessWidget {
|
||||
} else {
|
||||
launchCommunication(
|
||||
'whatsapp',
|
||||
'+962${box.read(BoxName.sosPhoneDriver)}', //todo add number from driver
|
||||
'+02${box.read(BoxName.sosPhoneDriver)}', //todo add number from driver
|
||||
"${"Hello this is Driver".tr} ${box.read(BoxName.nameDriver)}.${" My current location is:".tr} https://www.google.com/maps/place/${Get.find<LocationController>().myLocation.latitude},${Get.find<LocationController>().myLocation.longitude}${" \nand I have a trip on".tr} ${AppInformation.appName} ${"App \nwith Passenger ".tr}${mapDriverController.passengerName}");
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user