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