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

bound_location_picker のカバー
パッケージ詳細v0.0.1

bound_location_picker

公式の google_maps_flutter プラグインによって作成された Flutter パッケージで、境界内にある場所を選択するのに役立ちます。

AndroidiOSWeb
30日間ダウンロード
47
いいね数
3
Pub ポイント
140

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

flutter pub add bound_location_picker

パッケージ概要

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

Google Mapsの統合を使用して、定義された境界内での場所の選択をユーザーに可能にするFlutterパッケージです。公式のgoogle_maps_flutterプラグインの拡張として構築されており、特定の地理領域に選択を制限することで、場所選択に対する強化されたコントロールを提供します。配達サービスやイベントチェックインなど、事前に定義されたゾーン内で正確な場所入力を必要とするアプリケーションに最適です。Android、iOS、Webプラットフォームをサポートしており、クロスプラットフォームの一貫性を確保しています。

用途

  • 配達エリアの選択
  • イベント場所の登録
  • ジオフェンス領域ナビゲーション
  • 地図ベースのフォーム入力
  • 境界内の場所の検証

主な機能

  • 境界制限付きの位置選択
  • google_maps_flutter との統合
  • クロスプラットフォーム対応(Android、iOS、Web)
  • カスタマイズ可能な地図の境界
  • リアルタイムの位置フィードバック

適している対象

  • ジオフェンシングが必要なアプリ
  • 場所に応じたフォーム
  • 配達および物流アプリ
  • イベント管理ツール
  • マップ中心のユーザーインターフェース

注意事項

  • Google Maps API キーが必要です
  • 限定された領域選択に制限
  • google_maps_flutter に依存しています
  • Webサポートにはレンダリングの違いがある可能性があります
  • ユーザーは場所の権限を有効にする必要があります

元の README

関連するソースリポジトリの README 原文のスナップショットです。最新の内容はリポジトリをご覧ください。

Bound Location Picker for Flutter

Pub Version

A Flutter package created by the official google_maps_flutter plugin, which can help you to picked locations within a boundary.

Highlighted feature
  • Pick location within the Polygon boundary
  • Pick location within the Circular Radius boundary

Made by @Hasan

Android iOS Web
Support SDK 20+ iOS 11+ Same as Flutter's
Regular Picker Circle Boundary Polygon Boundary

💻 Usage

First, add bound_location_picker as a dependency in your pubspec.yaml file.

dependencies:
  flutter:
    sdk: flutter

  bound_location_picker: ^update_version

Don't forget to flutter pub get.

Android
  1. Set the minSdkVersion in android/app/build.gradle:
android {
    defaultConfig {
        minSdkVersion 20
    }
}

This means that app will only be available for users that run Android SDK 20 or higher.

  1. Specify your API key in the application manifest android/app/src/main/AndroidManifest.xml:
<manifest ...
  <application ...
    <meta-data android:name="com.google.android.geo.API_KEY"
               android:value="YOUR KEY HERE"/>
iOS

To set up, specify your API key in the application delegate ios/Runner/AppDelegate.m:

#include "AppDelegate.h"
#include "GeneratedPluginRegistrant.h"
#import "GoogleMaps/GoogleMaps.h"

@implementation AppDelegate

- (BOOL)application:(UIApplication *)application
    didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
  [GMSServices provideAPIKey:@"YOUR KEY HERE"];
  [GeneratedPluginRegistrant registerWithRegistry:self];
  return [super application:application didFinishLaunchingWithOptions:launchOptions];
}
@end

Or in your swift code, specify your API key in the application delegate ios/Runner/AppDelegate.swift:

import UIKit
import Flutter
import GoogleMaps

@UIApplicationMain
@objc class AppDelegate: FlutterAppDelegate {
  override func application(
    _ application: UIApplication,
    didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
  ) -> Bool {
    GMSServices.provideAPIKey("YOUR KEY HERE")
    GeneratedPluginRegistrant.register(with: self)
    return super.application(application, didFinishLaunchingWithOptions: launchOptions)
  }
}
Web

You'll need to modify the web/index.html file of your Flutter Web application to include the Google Maps JS SDK.

Check the google_maps_flutter_web README for the latest information on how to prepare your App to use Google Maps on the web.

Sample Usage
class MyApp extends StatefulWidget {
  const MyApp({super.key});

  @override
  State<MyApp> createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      debugShowCheckedModeBanner: false,
      home: Scaffold(
        body: BoundLocationPicker(
          initialCameraPosition: const LatLng(24.540725, 89.631088),
          onPickedLocation: (LatLng? location) {
            ///TODO do something using location 
          },
          onLocationUpdateListener: (LatLng? location) {
            ///TODO do something with current location
          },
          locationPickerImage: const AssetImage("assets/pin_point.png"),
          circleBoundary: CircleBoundary(radius: 800),
          enablePickedButton: true,
        ),
      ),
    );
  }
}
👨🏻‍💻Contribute to the project

All contributions are welcome.

GitHub

カテゴリー

依存関係

依存関係一覧 4 件

ソースリポジトリ

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

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