17 lines
469 B
Dart
17 lines
469 B
Dart
import 'package:location/location.dart';
|
|
import 'package:get/get.dart';
|
|
|
|
class LocationPermissions {
|
|
late Location location;
|
|
|
|
Future locationPermissions() async {
|
|
location = Location();
|
|
var permissionStatus = await location.requestPermission();
|
|
if (permissionStatus == PermissionStatus.denied) {
|
|
// The user denied the location permission.
|
|
Get.defaultDialog(title: 'GPS Required Allow !.'.tr, middleText: '');
|
|
return null;
|
|
}
|
|
}
|
|
}
|