Skip to content
pubscout

google_geocoding_api

1.5.2, released 3 years ago by an unverified publisher

Implements the Google Geocoding API with default and reverse geosearch.

WASM-ready
$ flutter pub add google_geocoding_api
Source repository

What it does

Provides a Dart client for the Google Geocoding API, supporting latitude/longitude lookup, reverse geocoding for address lookups, and place geocoding. It includes an experimental utility method to map results into simplified pretty address objects.

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

Use it when

  • You need to query Google's Geocoding API in a pure Dart or Flutter environment
  • You want to convert addresses to coordinates or coordinates to addresses via Google

Skip it when

  • You are looking for an on-device geocoding or general mapping solution without depending on Google's API services
  • You require offline geocoding capabilities

Strengths

  • Pure Dart dependency with no mandatory Flutter constraints
  • Easy to use API for standard geocoding, reverse geocoding, and place geocoding
  • Built-in pretty address mapper for easier data extraction

Weaknesses

  • Requires a valid Google Developer Console API key and relies on a paid external web service
  • The pretty address mapping feature is marked as experimental

Setup

Kind
Pure Dart
Effort
Low
Code generation
No
Direct dependencies
1

Requires obtaining an API key from the Google Developer Console.

import 'package:google_geocoding_api/google_geocoding_api.dart';

Future<void> main() async {
  const String googelApiKey = 'YOUR_API_KEY';
  final bool isDebugMode = true;  
  final api = GoogleGeocodingApi(googelApiKey, isLogged: isDebugMode);  
  final searchResults = await api.search(
    'Boston',
    language: 'en',
  );
}

Alternatives

Packages that do the same job and could replace google_geocoding_api.

  • geocoding

    If you prefer using platform native geocoding services instead of relying on the Google Geocoding web API.

  • geolocator

    If your primary requirement is obtaining the current device location rather than querying a geocoding database.

Works with

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