diff --git a/android/app/build.gradle b/android/app/build.gradle index 3429514798da079f2d4097ca77bbe6274d7e1931..29eedb26ca9fcf254936f1d17135e9cc4504f840 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -5,6 +5,7 @@ if (localPropertiesFile.exists()) { localProperties.load(reader) } } +println localProperties.getProperty("MAPS_API_KEY") def flutterRoot = localProperties.getProperty('flutter.sdk') if (flutterRoot == null) { @@ -44,6 +45,7 @@ android { versionCode flutterVersionCode.toInteger() versionName flutterVersionName testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" + resValue "string","googleAndroidGeo", localProperties.getProperty("MAPS_API_KEY") } buildTypes { diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml index 5f22d9a5476526119d4480cafcc364e70e0cca40..e378121e520cacfdae75ae60229a9f392cd94a66 100644 --- a/android/app/src/main/AndroidManifest.xml +++ b/android/app/src/main/AndroidManifest.xml @@ -27,6 +27,6 @@ android:name="flutterEmbedding" android:value="2" /> + android:value="googleAndroidGeo"/> diff --git a/android/build.gradle b/android/build.gradle index abfc1608fc5673aae61016fb701a3d25ca3b0761..6f110de1f2998db83a12f1904667881a7f470604 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -28,4 +28,4 @@ subprojects { task clean(type: Delete) { delete rootProject.buildDir -} +} \ No newline at end of file diff --git a/pubspec.yaml b/pubspec.yaml index 2020002761a7c0fa5b182e926b398b9141973e4e..8de903fc92c6de2a7a8dab5b33230027ab7242f1 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -29,6 +29,7 @@ dependencies: # Use with the CupertinoIcons class for iOS style icons. cupertino_icons: ^0.1.2 google_maps_flutter: ^0.5.24+1 + flutter_dotenv: ^2.1.0 dev_dependencies: flutter_test: @@ -50,6 +51,7 @@ flutter: assets: - assets/icon/loc.png - assets/icon/current_loc.png + - .env # An image asset can refer to one or more resolution-specific "variants", see # https://flutter.dev/assets-and-images/#resolution-aware.