checkLocationStatus static method
get location status: GPS enabled and the permission status with GeolocationStatus
Implementation
static Future<LocationStatus> checkLocationStatus() async {
final status = await Geolocator.checkPermission();
final enabled = await Geolocator.isLocationServiceEnabled();
return LocationStatus(enabled, status);
}