패키지, 저장소 및 앱 카테고리 검색

패키지 상세v0.4.3

flutter_google_places_sdk

각 플랫폼에서 네이티브 라이브러리를 사용하는 Google Places SDK용 Flutter 플러그인

AndroidiOSWebmacOSWindowsLinux
30일 다운로드
2.5만
좋아요
110
Pub 점수
140

패키지 설치

flutter pub add flutter_google_places_sdk

패키지 개요

공개 정보를 바탕으로 생성한 선택 가이드입니다.

Android, iOS, Web, macOS, Windows, Linux용 네이티브 Google Places SDK를 통합하는 플러터 플러그인입니다. 개발자가 최적의 성능과 일관성을 위해 플랫폼별 네이티브 라이브러리를 사용하여 장소 검색, 자동 완성 및 주소 선택 기능을 구현할 수 있도록 합니다. 이 패키지는 플러터 앱 내에서 Google 지리 정보 서비스에 쉽게 접근할 수 있도록 하며, 모든 지원되는 플랫폼에서 원활한 사용자 경험을 보장합니다.

사용 사례

  • 자동 완성 기능이 있는 검색
  • 폼 내 주소 선택
  • 위치 기반 앱 기능
  • 장소 데이터와의 지도 통합
  • 사용자 위치 탐지
  • 여행 및 배송 앱 기능 개선

주요 기능

  • 네이티브 Google Places SDK 사용
  • 크로스 플랫폼 호환성
  • 실시간 장소 제안
  • 여러 플랫폼(안드로이드, iOS, 웹, macOS, Windows, 리눅스)을 지원합니다
  • 경량이고 효율적
  • 기존 플러터 프로젝트와의 간편한 통합

적합한 대상

  • 위치 인식 앱을 개발하는 개발자
  • 정확한 주소 입력이 필요한 앱
  • 여행, 배달 음식, 또는 라이드셰어링 플랫폼
  • 네이티브 수준의 성능이 필요한 프로젝트
  • 다양한 플랫폼 간에 일관된 장소 선택기 동작을 원하는 팀

고려 사항

  • Google API 키 구성이 필요합니다
  • Google Play 서비스에 종속됨(안드로이드)
  • Google Cloud 청구 기준으로 사용 제한이 있을 수 있습니다
  • 웹 버전은 추가 설정이 필요합니다
  • iOS는 올바른 Info.plist 구성이 필요합니다
  • 초기 장소 로딩 중 잠재적인 지연

원본 README

연결된 소스 저장소의 README 원문 스냅샷입니다. 최신 내용은 저장소에서 확인하세요.

flutter_google_places_sdk

pub package

Tests

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.

Usage

To use this plugin, add flutter_google_places_sdk as a dependency in your pubspec.yaml file.

Web Usage

When using the web support you also need to enable the Maps JavaScript API in google cloud:

https://developers.google.com/maps/documentation/javascript/get-api-key

Limits:

  • 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';

void main() {
  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
  1. General code quality will adhere to new PRs, although nothing too strict. Specifics will discussed in each PRs.
  2. 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.

카테고리

의존성

의존성 목록 7 개

소스 저장소

이 패키지를 사용하는 프로젝트

아직 데이터가 없습니다.