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

パッケージ詳細v0.3.0

flutter_google_places_sdk_macos

Flutter プラグイン for Google Places SDK の macOS 実装

macOS
30日間ダウンロード
4.5万
いいね数
0
Pub ポイント
150

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

flutter pub add flutter_google_places_sdk_macos

パッケージ概要

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

macOS専用のFlutterプラグイン実装であり、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

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.

カテゴリー

依存関係

依存関係一覧 2 件

ソースリポジトリ

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

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

ランキング