Compare commits

..

7 Commits

Author SHA1 Message Date
Van Leemput Dayron
4af4450b94 feat: add Firebase Analytics and make Google Maps Flutter dependencies direct.
All checks were successful
Deploy Flutter to Firebase (Mac) / deploy-android (push) Successful in 3m23s
2026-01-02 17:27:27 +01:00
Van Leemput Dayron
6be4bed2e0 Merge branch 'main' into release 2026-01-02 17:26:26 +01:00
Van Leemput Dayron
d13094c662 Fix problems 2026-01-02 17:24:59 +01:00
Van Leemput Dayron
1b6d40627d feat: Switch API key retrieval from flutter_dotenv to firebase_options.dart and update build version.
All checks were successful
Deploy Flutter to Firebase (Mac) / deploy-android (push) Successful in 3m4s
2025-12-30 17:10:12 +01:00
Van Leemput Dayron
67a7d1ad2a feat: Streamline Google Maps API key retrieval and update Google Maps Flutter dependencies.
All checks were successful
Deploy Flutter to Firebase (Mac) / deploy-android (push) Successful in 2m48s
2025-12-30 16:56:13 +01:00
Van Leemput Dayron
4ef550f48b Fix theme in settings
All checks were successful
Deploy Flutter to Firebase (Mac) / deploy-android (push) Successful in 2m59s
2025-12-30 16:34:05 +01:00
Van Leemput Dayron
993a5870c5 fix: enhance missing Google Maps API key error message with debug details including available keys and platform information.
All checks were successful
Deploy Flutter to Firebase (Mac) / deploy-android (push) Successful in 2m53s
2025-12-30 16:23:56 +01:00
4 changed files with 27 additions and 24 deletions

View File

@@ -150,7 +150,9 @@ class ProfileContent extends StatelessWidget {
style: TextStyle( style: TextStyle(
fontSize: 16, fontSize: 16,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
color: Colors.black87, color: Theme.of(context).brightness == Brightness.dark
? Colors.white
: Colors.black87,
), ),
), ),
], ],

View File

@@ -1,7 +1,7 @@
import 'dart:io'; import 'dart:io';
import 'dart:convert'; import 'dart:convert';
import 'package:http/http.dart' as http; import 'package:http/http.dart' as http;
import 'package:flutter_dotenv/flutter_dotenv.dart'; import '../firebase_options.dart'; // Add this import
import '../models/activity.dart'; import '../models/activity.dart';
import '../services/error_service.dart'; import '../services/error_service.dart';
import '../services/logger_service.dart'; import '../services/logger_service.dart';
@@ -16,16 +16,14 @@ class ActivityPlacesService {
final ErrorService _errorService = ErrorService(); final ErrorService _errorService = ErrorService();
static String get _apiKey { static String get _apiKey {
if (Platform.isAndroid) { try {
return dotenv.env['GOOGLE_MAPS_API_KEY_ANDROID'] ?? return DefaultFirebaseOptions.currentPlatform.apiKey;
dotenv.env['GOOGLE_MAPS_API_KEY'] ?? } catch (e) {
''; LoggerService.error(
} else if (Platform.isIOS) { 'ActivityPlacesService: Impossible de récupérer la clé API Firebase: $e',
return dotenv.env['GOOGLE_MAPS_API_KEY_IOS'] ?? );
dotenv.env['GOOGLE_MAPS_API_KEY'] ?? return '';
'';
} }
return dotenv.env['GOOGLE_MAPS_API_KEY'] ?? '';
} }
/// Recherche des activités près d'une destination /// Recherche des activités près d'une destination
@@ -116,7 +114,13 @@ class ActivityPlacesService {
LoggerService.error( LoggerService.error(
'ActivityPlacesService: Clé API Google Maps manquante', 'ActivityPlacesService: Clé API Google Maps manquante',
); );
throw Exception('Clé API Google Maps non configurée'); throw Exception(
'Clé API Google Maps non configurée dans DefaultFirebaseOptions. Platform: ${Platform.isAndroid
? 'Android'
: Platform.isIOS
? 'iOS'
: 'Autre'}',
);
} }
final encodedDestination = Uri.encodeComponent(destination); final encodedDestination = Uri.encodeComponent(destination);

View File

@@ -737,13 +737,13 @@ packages:
source: hosted source: hosted
version: "2.13.1" version: "2.13.1"
google_maps_flutter_android: google_maps_flutter_android:
dependency: transitive dependency: "direct main"
description: description:
name: google_maps_flutter_android name: google_maps_flutter_android
sha256: f820a3990d4ff23e3baf01ce794f7f08cca9a9ce6c875ec96882d605f6f039df sha256: "3835f6ae5e8b8d4d454d913575069513c9f216e088b87aa5c18cb3610951c6b4"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "2.18.4" version: "2.18.6"
google_maps_flutter_ios: google_maps_flutter_ios:
dependency: transitive dependency: transitive
description: description:
@@ -753,13 +753,13 @@ packages:
source: hosted source: hosted
version: "2.15.5" version: "2.15.5"
google_maps_flutter_platform_interface: google_maps_flutter_platform_interface:
dependency: transitive dependency: "direct main"
description: description:
name: google_maps_flutter_platform_interface name: google_maps_flutter_platform_interface
sha256: f4b9b44f7b12a1f6707ffc79d082738e0b7e194bf728ee61d2b3cdf5fdf16081 sha256: e8b1232419fcdd35c1fdafff96843f5a40238480365599d8ca661dde96d283dd
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "2.14.0" version: "2.14.1"
google_maps_flutter_web: google_maps_flutter_web:
dependency: transitive dependency: transitive
description: description:

View File

@@ -16,7 +16,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
# In Windows, build-name is used as the major, minor, and patch parts # In Windows, build-name is used as the major, minor, and patch parts
# of the product and file versions while build-number is used as the build suffix. # of the product and file versions while build-number is used as the build suffix.
version: 2025.12.1+1 version: 2025.12.1+4
environment: environment:
sdk: ^3.9.2 sdk: ^3.9.2
@@ -64,12 +64,9 @@ dependencies:
firebase_messaging: ^16.0.4 firebase_messaging: ^16.0.4
flutter_local_notifications: ^19.5.0 flutter_local_notifications: ^19.5.0
package_info_plus: ^8.3.1 package_info_plus: ^8.3.1
<<<<<<< Updated upstream
=======
google_maps_flutter_platform_interface: ^2.14.1 google_maps_flutter_platform_interface: ^2.14.1
google_maps_flutter_android: ^2.18.6 google_maps_flutter_android: ^2.18.6
firebase_analytics: ^12.1.0 firebase_analytics: ^12.1.0
>>>>>>> Stashed changes
dev_dependencies: dev_dependencies:
flutter_launcher_icons: ^0.13.1 flutter_launcher_icons: ^0.13.1