Search packages, repositories and app categories

flutter_google_places_web cover
Package detailsv1.0.2

flutter_google_places_web

A web designed inline form field for Google Places Autocomplete. For mobile use https://github.com/fluttercommunity/flutter_google_places

Web
30-day downloads
95
Likes
21
Pub points
140

Install package

flutter pub add flutter_google_places_web

Package Overview

Package selection guidance compiled from public package information, community data, and project usage.

A web-specific Flutter package that provides an inline form field for Google Places Autocomplete, enabling users to search and select locations directly within a web application. Designed specifically for the web platform, it integrates seamlessly with Google's Places API to offer real-time suggestions and address input. Unlike its mobile counterpart, this package focuses on web usability, ensuring responsive design and smooth interaction in browser environments. It simplifies location selection without requiring full-page redirects or complex configurations.

Use cases

  • Web-based address entry forms
  • Location search in travel apps
  • E-commerce checkout with address autocomplete
  • Real-time location filtering
  • User profile setup with geolocation
  • Online booking systems

Key features

  • Web-optimized UI components
  • Real-time Google Places Autocomplete
  • Inline form field integration
  • Responsive design for browsers
  • Simple configuration with Google API key
  • Supports place details retrieval

Suitable for

  • Web developers building location-aware apps
  • Applications needing fast address input
  • Projects using Google Places API on the web
  • Frontend teams focused on UX for location fields
  • Developers avoiding native mobile dependencies

Considerations

  • Requires valid Google Cloud Platform API key
  • Limited to web platform only
  • Depends on external Google Places API
  • May require CORS configuration
  • Performance depends on network speed
  • Not compatible with mobile platforms

Original README

Original README snapshot from the linked source repository. Visit the repository for the latest content.

Flutter Google Places Web

pub version donate

A web designed form field for Google Places Autocomplete

flutterwebplaces

API key

To use this library you need a Web API key. Here

Usage

FlutterGooglePlacesWeb is a Google Places Autocomplete field for Flutter Web.

import  'package:flutter_google_places_web/flutter_google_places_web.dart';

FlutterGooglePlacesWeb(
apiKey: <GOOGLE_API_KEY>,
proxyURL: 'https://cors-anywhere.herokuapp.com/',
components: 'country:us',
),

If you have XMLHttpRequest errors, please use a proxy. For more information please see cors-anywhere

If you are using the demo CORS Anywhere proxy (included in the example) - please allow temporary access or use your own proxy

If a user types and selects 1600 Amphitheatre Parkway you can retrieve the data

String name = FlutterGooglePlacesWeb.value['name'];
String streetAddress = FlutterGooglePlacesWeb.value['streetAddress'];
String city = FlutterGooglePlacesWeb.value['city'];
String country = FlutterGooglePlacesWeb.value['country'];

print(name); // '1600 Amphitheatre Parkway, Mountain View, CA, USA'
print(streetAddress); // '1600 Amphitheatre Parkway'
print(city); // 'CA'
print(country); // 'USA'

Roadmap

  • [Coming soon] Add mutliplatform support and remove CORS issues by having javascript API rather than http requests

Categories

Dependencies

Dependency list 3 items

Source repository

Projects using this package

No data available yet.