hasPermission method
check if the location service is enabled, if not enabled, request permission
Implementation
Future<bool> hasPermission() async {
PermissionStatus status = await Permission.location.request();
return (status == PermissionStatus.granted);
}