v1.0.2flutter_google_places_web
Google Placesの自動補完用に設計されたウェブインラインフォームフィールド。モバイル使用の場合は https://github.com/fluttercommunity/flutter_google_places
21いいね 18330日間ダウンロード140Pub ポイント
Web
jaxnz/flutter_google_places_web open-source repository details.
{"sdk":"flutter"}^1.4.0^4.5.1^2.0.1{"sdk":"flutter"}以下は英語原文のスナップショットです。最新版は GitHub をご覧ください。
A web designed form field for Google Places Autocomplete
flutterwebplaces
To use this library you need a Web API key. Here
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'