パッケージ、リポジトリ、アプリカテゴリを検索

パッケージ詳細v0.4.3

flutter_google_places_sdk

各プラットフォームでネイティブライブラリを使用する Google Places SDK のための Flutter プラグイン

AndroidiOSWebmacOSWindowsLinux
30日間ダウンロード
2.8万
いいね数
110
Pub ポイント
140

パッケージをインストール

flutter pub add flutter_google_places_sdk

パッケージ概要

公開情報に基づく選定ガイドです。参考としてご利用ください。

Android、iOS、Web、macOS、Windows、Linux のネイティブ Google Places SDK を統合する Flutter プラグインです。開発者が最適なパフォーマンスと一貫性を得るために、プラットフォーム固有のネイティブライブラリを使用して場所検索、自動補完、住所ピッカー機能を実装できるようにします。このパッケージは、Flutterアプリ内でのGoogleの地理情報サービスへのアクセスを簡素化し、すべての対応プラットフォームでシームレスなユーザー体験を確保します。

用途

  • 自動補完付きの検索
  • フォーム内の住所選択
  • 位置ベースのアプリ機能
  • 場所データとのマップ統合
  • ユーザーの場所発見
  • 旅行および配信アプリの機能強化

主な機能

  • ネイティブな Google Places SDK を使用します
  • クロスプラットフォーム互換性
  • リアルタイムの場所の提案
  • 複数のプラットフォーム(Android、iOS、Web、macOS、Windows、Linux)をサポートしています
  • 軽量で効率的
  • 既存のFlutterプロジェクトとの簡単な統合

適している対象

  • 場所を認識するアプリを開発している開発者
  • 正確な住所入力が必要なアプリ
  • 旅行、食品配達、またはライドシェアリングプラットフォーム
  • ネイティブレベルのパフォーマンスが必要なプロジェクト
  • 複数のプラットフォーム間で一貫した場所ピッカーの動作を求めるチーム

注意事項

  • Google API キーの設定が必要です
  • Google Play サービスに依存しています(Android)
  • Google Cloudの課金に基づいて使用制限がある可能性があります
  • Web版には追加のセットアップが必要です
  • 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 件

ソースリポジトリ

このパッケージを使用しているプロジェクト

データはまだありません。