Skip to content
pubscout

google_maps

8.3.0, released 4 months ago by an unverified publisher

Use the Google Maps JavaScript API directly from Dart scripts.

WASM-ready
$ flutter pub add google_maps
Source repository

What it does

Provides a Dart wrapper for the Google Maps JavaScript API v3, allowing developers to interact with maps, markers, and services entirely through Dart. It covers the full API and its additional libraries using wasm-safe JS-interop via package:web.

AI-written summary of version 8.3.0, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You are building a web application in Dart and want direct access to the Google Maps JavaScript API.
  • You need comprehensive coverage of all Google Maps JavaScript libraries.

Skip it when

  • You are building a mobile-first app using Flutter (use google_maps_flutter instead).
  • You prefer a declarative Flutter widget approach over dealing with raw JavaScript bindings and HTML elements.

Strengths

  • Covers all Google Maps JavaScript API v3 features and libraries.
  • Migrated to wasm-safe JS-interop using package:web.
  • Actively updated against official Google Maps documentation.

Weaknesses

  • Designed specifically for web/Dart scripts, not native Flutter mobile widgets.
  • Requires manual inclusion of the Google Maps JavaScript script tag in HTML.
  • Does not support alpha or beta elements/libraries.

Setup

Kind
Pure Dart
Effort
Low
Code generation
No
Direct dependencies
2

Add the package dependency and include the Google Maps JavaScript API script tag with your API key in your HTML file.

import 'package:google_maps/google_maps.dart';
import 'package:web/web.dart';

void main() {
  final mapOptions = MapOptions()
    ..zoom = 8
    ..center = LatLng(-34.397, 150.644);
  GMap(document.getElementById('map-canvas') as HTMLElement, mapOptions);
}

Alternatives

Packages that do the same job and could replace google_maps.

Works with

Packages commonly used together with google_maps: ones it builds on, ones built on it, and its own family.