10/10/1
This commit is contained in:
@@ -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 {
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user