How to integrate Google Map in Flutter Project (Android)

Getting start with Flutter

flutter create google_maps_in_flutter

Adding Google Maps Flutter plugin as a dependency

cd google_maps_in_flutter
flutter pub add google_maps_flutter

Configure Platform

For IOS:

# in ios/Podfile
# Set platform to 11.0 to enable latest Google Maps SDK
platform :ios, '11.0' # Uncomment and set to 11.

# CocoaPods analytics sends network stats synchronously affecting flutter build latency.

For Anfroid

# in android/app/build.gradle
android {
    defaultConfig {
        // TODO: Specify your own unique Application ID (
        applicationId "com.example.google_maps_in_flutter"
        minSdkVersion 20                      // Update from 16 to 20
        targetSdkVersion 30
        versionCode flutterVersionCode.toInteger()
        versionName flutterVersionName

Get Map API keys for project

Follow instructions in link.

Adding an API key for an Android app

# in android/app/src/main/AndroidManifest.xml
        <meta-data android:name=""

Putting a map on the screen

# lib/main.dart
import 'package:flutter/material.dart';
import 'package:google_maps_flutter/google_maps_flutter.dart';

void main() => runApp(const MyApp());

class MyApp extends StatefulWidget {
  const MyApp({Key? key}) : super(key: key);

  _MyAppState createState() => _MyAppState();

class _MyAppState extends State<MyApp> {
  late GoogleMapController mapController;

  final LatLng _center = const LatLng(45.521563, -122.677433);

  void _onMapCreated(GoogleMapController controller) {
    mapController = controller;

  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: const Text('Maps Sample App'),
        body: GoogleMap(
          onMapCreated: _onMapCreated,
          initialCameraPosition: CameraPosition(
            target: _center,
            zoom: 11.0,

Run Project from Android Studio

Learn more from Google Instruction.