hasPermissions method
Implementation
Future<bool> hasPermissions() async {
LocationPermission permission = await Geolocator.checkPermission();
if (permission == LocationPermission.denied ||
permission == LocationPermission.deniedForever) {
return false;
}
return true;
}