feat: Add map navigation, enhance FCM deep linking, localize Google Places API, and refine activity display.

This commit is contained in:
Van Leemput Dayron
2025-12-04 11:24:30 +01:00
parent cf4c6447dd
commit e174c1274d
13 changed files with 991 additions and 383 deletions

View File

@@ -116,7 +116,7 @@ class ActivityPlacesService {
final encodedDestination = Uri.encodeComponent(destination);
final url =
'https://maps.googleapis.com/maps/api/geocode/json?address=$encodedDestination&key=$_apiKey';
'https://maps.googleapis.com/maps/api/geocode/json?address=$encodedDestination&key=$_apiKey&language=fr';
LoggerService.info('ActivityPlacesService: Géocodage de "$destination"');
LoggerService.info('ActivityPlacesService: URL = $url');
@@ -184,7 +184,8 @@ class ActivityPlacesService {
'?location=$lat,$lng'
'&radius=$radius'
'&type=${category.googlePlaceType}'
'&key=$_apiKey';
'&key=$_apiKey'
'&language=fr';
final response = await http.get(Uri.parse(url));
@@ -287,7 +288,8 @@ class ActivityPlacesService {
'https://maps.googleapis.com/maps/api/place/details/json'
'?place_id=$placeId'
'&fields=formatted_address,formatted_phone_number,website,opening_hours,editorial_summary'
'&key=$_apiKey';
'&key=$_apiKey'
'&language=fr';
final response = await http.get(Uri.parse(url));
@@ -356,7 +358,8 @@ class ActivityPlacesService {
'?query=$encodedQuery in $destination'
'&location=${coordinates['lat']},${coordinates['lng']}'
'&radius=$radius'
'&key=$_apiKey';
'&key=$_apiKey'
'&language=fr';
final response = await http.get(Uri.parse(url));
@@ -513,7 +516,8 @@ class ActivityPlacesService {
'?location=$lat,$lng'
'&radius=$radius'
'&type=${category.googlePlaceType}'
'&key=$_apiKey';
'&key=$_apiKey'
'&language=fr';
if (nextPageToken != null) {
url += '&pagetoken=$nextPageToken';
@@ -589,7 +593,8 @@ class ActivityPlacesService {
'?location=$lat,$lng'
'&radius=$radius'
'&type=tourist_attraction'
'&key=$_apiKey';
'&key=$_apiKey'
'&language=fr';
if (nextPageToken != null) {
url += '&pagetoken=$nextPageToken';