flutter_google_places_web 0.0.6 copy "flutter_google_places_web: ^0.0.6" to clipboard
flutter_google_places_web: ^0.0.6 copied to clipboard

outdated

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

Flutter Google Places Web #

pub version

[![Donate](https://img.shields.io/badge/Donate-PayPal-green.svg)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=MJWWX73VL8DQW&source=url)

A web designed form field for Google Places Autocomplete

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 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'
20
likes
0
pub points
86%
popularity

Publisher

verified publisherjacksonlee.dev

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

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

dio, flutter, uuid

More

Packages that depend on flutter_google_places_web