This commit is contained in:
Hamza-Ayed
2024-10-10 16:22:30 +03:00
parent ebb57a699b
commit 9b0caf3bed
21 changed files with 1142 additions and 630 deletions

View File

@@ -70,6 +70,23 @@ class AI extends GetxController {
}
}
Future updatePassengersInvitation() async {
if (formKey.currentState!.validate()) {
var res = await CRUD().post(
link: AppLink.updatePassengersInvitation,
payload: {"inviteCode": invitationCodeController.text});
if (res != 'failure') {
isInviteDriverFound = true;
update();
Get.snackbar("Code approved".tr, '',
backgroundColor: AppColor.greenColor);
} else {
Get.snackbar("Code not approved".tr, '',
backgroundColor: AppColor.redColor);
}
}
}
final today = DateTime.now();
Future<void> addDriverAndCarEgypt() async {

View File

@@ -28,25 +28,13 @@ Future<void> getPermissionOverlay() async {
}
}
// Future<void> getPermissionLocation() async {
// // final PermissionStatus status = await Permission.location.status;
// // if (!status.isGranted) {
// // Log.print('status.isGranted: ${status.isGranted}');
// // // box.write(BoxName.locationPermission, 'true');
// // await Permission.location.request();
// // Get.find<LoginDriverController>().update();
// // MyDialog().getDialog(
// // 'Enable Location Permission'.tr, // {en:ar}
// // 'Allowing location access will help us display orders near you. Please enable it now.'
// // .tr, // {en:ar}
// // () async {
// // Get.back();
// // box.write(BoxName.locationPermission, 'true');
// // await Permission.location.request();
// // },
// // );
// // }
// }
Future<void> closeOverlayIfFound() async {
bool isOverlayActive = await FlutterOverlayWindow.isActive();
if (isOverlayActive) {
await FlutterOverlayWindow.closeOverlay();
}
}
final location = Location();
Future<void> getLocationPermission() async {
bool serviceEnabled;