feat(api-keys): Replace Google Places API key with Google Maps API key across the application
This commit is contained in:
@@ -1,4 +1,3 @@
|
|||||||
{
|
{
|
||||||
"GOOGLE_PLACES_API_KEY": "AIzaSyAS9yTf4q51_CNSZ7mbmeS9V3l_LZR80lU",
|
"GOOGLE_MAPS_API_KEY": "AIzaSyAS9yTf4q51_CNSZ7mbmeS9V3l_LZR80lU"
|
||||||
"GOOGLE_MAPS_API_KEY": "AIzaSyAyRS9I4xxoVPAX91RJvWJHszB3ZY3-IC0"
|
|
||||||
}
|
}
|
||||||
@@ -4,9 +4,6 @@
|
|||||||
class AppConfig {
|
class AppConfig {
|
||||||
AppConfig._();
|
AppConfig._();
|
||||||
|
|
||||||
/// The Google Places API key used for address autocomplete functionality.
|
/// The Google Maps API key.
|
||||||
static const String googlePlacesApiKey = String.fromEnvironment('GOOGLE_PLACES_API_KEY');
|
|
||||||
|
|
||||||
/// The Google Maps Static API key used for location preview images.
|
|
||||||
static const String googleMapsApiKey = String.fromEnvironment('GOOGLE_MAPS_API_KEY');
|
static const String googleMapsApiKey = String.fromEnvironment('GOOGLE_MAPS_API_KEY');
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -262,7 +262,7 @@ class HubRepositoryImpl
|
|||||||
<String, String>{
|
<String, String>{
|
||||||
'place_id': placeId,
|
'place_id': placeId,
|
||||||
'fields': 'address_component',
|
'fields': 'address_component',
|
||||||
'key': AppConfig.googlePlacesApiKey,
|
'key': AppConfig.googleMapsApiKey,
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
try {
|
try {
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ class HubAddressAutocomplete extends StatelessWidget {
|
|||||||
return GooglePlaceAutoCompleteTextField(
|
return GooglePlaceAutoCompleteTextField(
|
||||||
textEditingController: controller,
|
textEditingController: controller,
|
||||||
focusNode: focusNode,
|
focusNode: focusNode,
|
||||||
googleAPIKey: AppConfig.googlePlacesApiKey,
|
googleAPIKey: AppConfig.googleMapsApiKey,
|
||||||
debounceTime: 500,
|
debounceTime: 500,
|
||||||
countries: HubsConstants.supportedCountries,
|
countries: HubsConstants.supportedCountries,
|
||||||
isLatLngRequired: true,
|
isLatLngRequired: true,
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
import 'dart:convert';
|
import 'dart:convert';
|
||||||
|
|
||||||
import 'package:http/http.dart' as http;
|
import 'package:http/http.dart' as http;
|
||||||
import 'package:krow_core/core.dart';
|
import 'package:krow_core/core.dart';
|
||||||
|
|
||||||
import '../../domain/repositories/place_repository.dart';
|
import '../../domain/repositories/place_repository.dart';
|
||||||
|
|
||||||
class PlaceRepositoryImpl implements PlaceRepository {
|
class PlaceRepositoryImpl implements PlaceRepository {
|
||||||
@@ -18,7 +20,7 @@ class PlaceRepositoryImpl implements PlaceRepository {
|
|||||||
<String, String>{
|
<String, String>{
|
||||||
'input': query,
|
'input': query,
|
||||||
'types': '(cities)',
|
'types': '(cities)',
|
||||||
'key': AppConfig.googlePlacesApiKey,
|
'key': AppConfig.googleMapsApiKey,
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user