Mapping the road ahead…

Flutter 1.0 features..

There was everything special in the Flutter event (this year)..Choosing one out of them, I decided to explore Google Maps…

Asked by developers, delivered by Flutter….

Things needed…

  1. Add google_maps_flutterin the pubspec.yaml
  2. Get an API key at
  3. For Android : Specify your API key in the application manifest android/app/src/main/AndroidManifest.xml
Android Manifest.xml

For iOS : Specify your API key in the application delegate ios/Runner/AppDelegate.m:

iOS AppDelegate.m

Important lines :

#import “GoogleMaps/GoogleMaps.h”

[GMSServices provideAPIKey:@”YOUR KEY HERE”]

3. Add import ‘package:google_maps_flutter/google_maps_flutter.dart’; in your main.dart

All geared up….

Flutter and Google Maps…

How to start…

Start with initializing the GoogleMap (a widget)

GoogleMap widget…

onMapCreated : Callback which takes GoogleMapController…initialized as 

GoogleMapController mapController;

options : An optional widget, can be used for customizing the Google Maps UI configurations..Takes in GoogleMapOptions, some properties such as

Google Map Options…

scrollGesturesEnabled : if the map should respond to scroll gestures, tiltGesturesEnabled : if the map should respond to tilt gestures,

rotateGesturesEnabled : if the map should respond to tilt gestures,

myLocationEnabled : if a “My Location” layer should be shown on the map,

This layer includes a location indicator at the current device location, as well as a My Location button. Enabling this feature requires adding location permissions to both native platforms of your app.

compassEnabled : if the map should show a compass when rotated,

mapType :type of map tiles to be rendered,

zoomGesturesEnabled : if the map view should respond to zoom gestures,

cameraPosition : used to indicate initial camera position and to update that position programmatically along with other changes to the map user interface,

Satellite View…

Changing to the different map types is achieved by mapController’s updateMapOptions and setting to MapType.satellite

Current Location..

Using mapController’s cameraPositionwe can extract the current location. ||

Flutter and Google Maps…

Using mapController’s addMarker, passing the position to be marked.

Marking Places…

infoWindowText : Contents to be displayed in the marked location,

icon : description of the bitmap used to draw the marker icon

That’s all folks!!!!!

Video demonstration : 

For complete source code, visit :

1 Comment

  • Flutter is great and we are greatly encouraged to develop an application similar to your app using Flutter. Check the marvelapp screen prototype -

    We would like to know how Location is shared on real time basis and which plugins/packages have you can use to achieve it. We would be gratefully indebted for your guidance on this project.

    Looking forward for great connection.

Valuable comments