Update map autocompletion
This commit is contained in:
@@ -24,6 +24,7 @@ import 'package:flutter_dotenv/flutter_dotenv.dart';
|
||||
import '../../services/place_image_service.dart';
|
||||
import '../../services/trip_geocoding_service.dart';
|
||||
import '../../services/logger_service.dart';
|
||||
import '../../firebase_options.dart';
|
||||
|
||||
/// Create trip content widget for trip creation and editing functionality.
|
||||
///
|
||||
@@ -86,16 +87,7 @@ class _CreateTripContentState extends State<CreateTripContent> {
|
||||
|
||||
/// Google Maps API key for location services
|
||||
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'] ?? '';
|
||||
return DefaultFirebaseOptions.currentPlatform.apiKey;
|
||||
}
|
||||
|
||||
/// Participant management
|
||||
|
||||
@@ -6,6 +6,7 @@ import 'dart:convert';
|
||||
import 'package:http/http.dart' as http;
|
||||
import 'dart:ui' as ui;
|
||||
import 'package:flutter_dotenv/flutter_dotenv.dart';
|
||||
import '../../firebase_options.dart';
|
||||
import '../../services/error_service.dart';
|
||||
import '../../services/map_navigation_service.dart';
|
||||
import '../../services/logger_service.dart';
|
||||
@@ -34,16 +35,7 @@ class _MapContentState extends State<MapContent> {
|
||||
List<PlaceSuggestion> _suggestions = [];
|
||||
|
||||
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'] ?? '';
|
||||
return DefaultFirebaseOptions.currentPlatform.apiKey;
|
||||
}
|
||||
|
||||
@override
|
||||
|
||||
Reference in New Issue
Block a user