Skip to content
pubscout

flutter_google_places_sdk

0.4.3, released 11 months ago by sparta.guru

Flutter plugin for Google Places SDK using native platform libraries.

WASM-ready
$ flutter pub add flutter_google_places_sdk
Source repository

What it does

Provides a Dart API to access Google Places autocomplete and other SDK features via the native libraries on each platform. It avoids HTTP requests, allowing API‑key restrictions on Android and iOS. Web support uses the Maps JavaScript API.

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

Use it when

  • You need Google Places autocomplete with native SDK integration
  • You want to restrict your API key to specific apps
  • You target multiple platforms (Android, iOS, web, desktop)

Skip it when

  • Location restriction is required (not supported)
  • You only need a simple HTTP‑based places request

Strengths

  • Uses native SDK for better security
  • Cross‑platform plugin covering mobile, web, and desktop
  • Simple Dart‑only API

Weaknesses

  • Location restriction not available
  • Web usage requires enabling Maps JavaScript API

Setup

Kind
Plugin (native code)
Effort
Medium
Code generation
No
Direct dependencies
7

Add the plugin to pubspec, provide your Google API key when creating FlutterGooglePlacesSdk. For web, enable Maps JavaScript API in Google Cloud. No additional native build steps beyond standard plugin setup.

import 'package:flutter/material.dart';
import 'package:flutter_google_places_sdk/flutter_google_places_sdk.dart';

void main() {
  runApp(MaterialApp(
    home: Scaffold(
      body: Center(
        child: ElevatedButton(
          onPressed: () async {
            final places = FlutterGooglePlacesSdk('my-key');
            final predictions = await places.findAutocompletePredictions('Tel Aviv');
            print('Result: $predictions');
          },
          child: Text('Predict and print to console'),
        ),
      ),
    ),
  ));
}

Alternatives

Packages that do the same job and could replace flutter_google_places_sdk.