This commit is contained in:
Hamza-Ayed
2024-05-03 02:14:11 +03:00
parent 725990ec4b
commit 9e0479a0b0
6 changed files with 109 additions and 4 deletions

View File

@@ -1725,13 +1725,39 @@ class MapPassengerController extends GetxController {
});
}
dialoge() {
Get.defaultDialog(
title: 'Location '.tr,
content: Container(
child: Column(
children: [
Text(
'We use location to get accurate and nearest driver for you'.tr,
style: AppStyle.title,
),
TextButton(
onPressed: () async {
// await Permission.location.request();
Get.back();
},
child: Text(
'Grant'.tr,
style: AppStyle.title,
),
)
],
),
),
);
}
double speed = 0;
Future<void> getLocation() async {
isLoading = true;
update();
bool serviceEnabled;
PermissionStatus permissionGranted;
// dialoge();
// Check if location services are enabled
serviceEnabled = await location.serviceEnabled();
if (!serviceEnabled) {