Flutter 패키지로, 앱에 Google Places 기능을 통합하기 위한 HTTP 기반 구현을 제공합니다. Android, iOS, Web, macOS, Windows, Linux 등 여러 플랫폼에서 위치, 장소 및 주소 검색 기능을 가능하게 합니다. 다른 플랫폼 전용 구현의 기초 계층으로 설계되어 HTTP 요청을 통해 Google Places API와 통신하며, 네이티브 코드 없이도 유연성과 호환성을 제공합니다. 장소 검색 및 자동 완성 기능을 위한 가벼우면서도 크로스플랫폼 솔루션을 찾는 개발자에게 이상적입니다.
사용 사례
폼에서 주소 자동 완성 사용
주소 검색 및 선택
지오로케이션 데이터 검색
크로스 플랫폼 위치 서비스
지도 기반 애플리케이션과의 통합
주요 기능
HTTP 기반 API 통신
다중 플랫폼 지원
경량이고 모듈러한 디자인
네이티브 플러그인과 호환됩니다
HTTP 요청을 통한 간단한 통합
적합한 대상
크로스 플랫폼 앱을 개발하는 개발자
네이티브 SDK 없이 위치 검색이 필요한 앱
사용자 지정 플랫폼 구현을 사용하는 프로젝트
네이티브 종속성보다 HTTP를 선호하는 팀
고려 사항
인터넷 연결이 필요합니다
Google Places API 키에 의존
HTTP 요청 기능에 제한됨
완전한 네이티브 플러그인은 아님
API 응답에 대한 추가적인 오류 처리가 필요할 수 있습니다
원본 README
연결된 소스 저장소의 README 원문 스냅샷입니다. 최신 내용은 저장소에서 확인하세요.
flutter_google_places_sdk
A Flutter plugin for google places sdk that uses the native libraries on each platform.
Check out Rational below to understand why you should use this plugin.
Location restriction is not supported. See google issue tracker for more info: https://issuetracker.google.com/issues/36219203
Rational
By now you probably found some other plugins, and wondering why this one was even created.
Well, there's a good reason for that.
All other plugins will use http web requests rather than the native sdk.
Google allows you to limit the usage of your api key to your android application.
However, that only works when you're using the native SDK.
So when using the http web requests method, you can't actually limit it,
and if someone can get your API key (usually not a problem if it's in a mobile client),
it can be used anywhere outside of it.
Example
import'package:flutter/material.dart';
import'package:flutter_google_places_sdk/flutter_google_places_sdk.dart';
voidmain() {
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'),
),
),
),
));
}
Development & Contributing
This is a side project of mine, hence issues are usually dealt with on weekends.
PRs are more than welcome if anyone want to contribute. There are
Contribution Guidelines
General code quality will adhere to new PRs, although nothing too strict. Specifics will discussed in each PRs.
This is a multi-platform plugin, and each package is maintained independently. As part of it, each commit that changes the version is also tagged per platform.
The result is that changes that require multiple packages will require multiple commits - and hence multiple PRs.