feat: Implement platform-specific Google Maps API key handling and update app version.
Some checks failed
Deploy to Play Store / build_and_deploy (push) Has been cancelled

This commit is contained in:
Van Leemput Dayron
2025-12-06 14:43:22 +01:00
parent 34b5efb1fc
commit ca28e0a780
6 changed files with 68 additions and 6 deletions

View File

@@ -1,3 +1,4 @@
import 'dart:io';
import 'dart:convert';
import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
@@ -84,7 +85,18 @@ class _CreateTripContentState extends State<CreateTripContent> {
String? _selectedImageUrl;
/// Google Maps API key for location services
static final String _apiKey = dotenv.env['GOOGLE_MAPS_API_KEY'] ?? '';
static String get _apiKey {
if (Platform.isAndroid) {
return dotenv.env['GOOGLE_MAPS_API_KEY_ANDROID'] ??
dotenv.env['GOOGLE_MAPS_API_KEY'] ??
'';
} else if (Platform.isIOS) {
return dotenv.env['GOOGLE_MAPS_API_KEY_IOS'] ??
dotenv.env['GOOGLE_MAPS_API_KEY'] ??
'';
}
return dotenv.env['GOOGLE_MAPS_API_KEY'] ?? '';
}
/// Participant management
final List<String> _participants = [];