Foodie
  • Introduction
  • Flutter App
    • Getting Started
    • Directory Structure
    • Change App Color theme
    • Chat with Vendor/Delivery Boy
    • Firebase
    • Firebase Phone OTP
    • Google Map
    • Running on Android Studio
    • Running App On VS Code
  • Social Login
    • Google Login
    • Facebook Login
  • Laravel Admin( Backend )
    • Getting Started
    • GUI Installer
    • Change Backend Color
    • App API
    • Payment Callbacks
    • System Settings
    • System Update & Terminal
    • Firebase
      • Firebase Database
    • Web Notification
    • Change Logs
  • Migration
    • ~ 1.3.0
    • ~ 1.5.1
    • ~ 1.6.0
Powered by GitBook
On this page

Was this helpful?

  1. Flutter App

Google Map

PreviousFirebase Phone OTPNextGoogle Login

Last updated 4 years ago

Was this helpful?

Google map was use to allow Customer/user picker different location on map for their delivery address.

For this to work, you would need to obtain a google map key api from google console. Here is a link to google console where you can get api key .

And don't forget to enable the following APIs in

  • Maps SDK for Android

  • Maps SDK for iOS

  • Places API

  • Geolocation API

  • Geocoding API

  • And ensure to enable billing for the project.

App Setup

Please follow the instructions below to add google map api key to the flutter project

Android

Specify your API key in the application manifest android/app/src/main/AndroidManifest.xml:

<manifest ...
  <application ...
    <meta-data android:name="com.google.android.geo.API_KEY"
               android:value="YOUR KEY HERE"/>

iOS

Specify your API key in the application delegate ios/Runner/AppDelegate.swift:

import UIKit
import Flutter
import GoogleMaps

@UIApplicationMain
@objc class AppDelegate: FlutterAppDelegate {
  override func application(
    _ application: UIApplication,
    didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?
  ) -> Bool {
    GMSServices.provideAPIKey("YOUR KEY HERE")
    GeneratedPluginRegistrant.register(with: self)
    return super.application(application, didFinishLaunchingWithOptions: launchOptions)
  }
}

https://cloud.google.com/maps-platform/
https://console.cloud.google.com/google/maps-apis/