Skip to content
pubscout

places_service

0.1.5, released a year ago by filledstacks.com

Dart service for Google Places API auto-complete, details, and nearby searches

WASM-ready
$ flutter pub add places_service

What it does

Provides methods to fetch place auto-complete suggestions, detailed place info, and nearby places using the Google Places API. It manages session tokens and handles errors via a custom exception.

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

Use it when

  • You need place suggestions while typing an address
  • You need detailed place data after selecting a suggestion
  • You want to show nearby places based on current location

Skip it when

  • You only need basic map display without place queries
  • You prefer a fully featured map widget library instead of a service

Strengths

  • Simple API, no code generation required
  • Handles session tokens automatically
  • Supports Android, iOS, web, windows, macos

Weaknesses

  • Relies on external Google API key and billing
  • No built-in caching or offline support
  • Limited to Places API features only

Setup

Kind
Flutter widgets
Effort
Low
Code generation
Yes (build_runner)
Direct dependencies
5

Add dependency, call initialize(apiKey: 'YOUR_KEY') before use. Ensure location permissions for nearby places.

final service = PlacesService();
service.initialize(apiKey: 'YOUR_KEY');
final suggestions = await service.getAutoComplete('new york');
final details = await service.getPlaceDetails(suggestions.first.placeId);

Alternatives

Packages that do the same job and could replace places_service.

Works with

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