macOS 전용 플러터 플러그인 구현으로, Google Places SDK를 위한 것으로 개발자가 macOS 애플리케이션에 Google Places 기능을 통합할 수 있도록 합니다. 사용자는 네이티브 macOS 앱 내에서 장소 검색, 장소 세부 정보 조회, 자동 완성 제안을 직접 이용할 수 있습니다. 이 패키지는 플랫폼 채널을 통해 Google의 Places API를 활용하여 하위 Google 서비스와 원활한 상호작용을 보장합니다. macOS를 대상으로 하는 개발자를 위해 설계되었으며, 위치 기반 검색 및 장소 예측 기능을 최소한의 설정으로 지원합니다.
사용 사례
macOS 데스크톱 앱에서 장소 검색 통합
주소에 대한 자동 완성 구현
위치에 대한 상세 정보 가져오기
macOS에서 여행 또는 물류 애플리케이션 빌드하기
생산성 도구에서 위치 탐색 활성화
주요 기능
네이티브 macOS 통합
장소 자동 완성 및 검색
장소 세부 정보 검색 지원
플랫폼 채널 통신
Flutter pub를 통한 간편한 설정
적합한 대상
위치 기능을 갖춘 macOS 앱을 개발하는 개발자
주소 입력 및 제안이 필요한 앱
Google Places API를 사용하는 데스크톱 애플리케이션
크로스 플랫폼 macOS 지원을 목표로 하는 Flutter 팀
Apple 데스크톱에서 신뢰할 수 있는 위치 데이터가 필요한 프로젝트
고려 사항
Google Cloud Platform API 키가 필요합니다
macOS 플랫폼에만 제한됨
인터넷 연결에 의존
다양한 플랫폼 간에 사용될 경우 iOS/Android용 추가 구성이 필요할 수 있습니다
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.