搜尋套件、儲存庫與 APP 分類

store_locator 封面
套件詳情v1.1.0

store_locator

適用於 Flutter 的商店定位器。可根據目前地圖位置顯示商店(或興趣點)。

AndroidiOSWeb
近 30 天下載
83
喜歡數
3
Pub 分數
160

安裝套件

flutter pub add store_locator

套件介紹

根據套件公開資料產生的選型評估,僅供參考。

Flutter 的 store_locator 套件讓開發者能夠在地圖上顯示商店或興趣點(POI),並根據使用者目前的位置動態更新。它能無縫整合至 Android、iOS 和 Web 平台的 Flutter 應用中,提供直覺的方式來視覺化附近的地點。此套件以簡單為設計核心,利用地圖服務呈現標記,並支援自訂樣式與過濾功能。非常適合需要基於位置發現的零售、服務或物流應用。

適用情境

  • 查找附近的商店
  • 在地圖上顯示興趣點
  • 基於位置的服務發現
  • 零售應用導航
  • 基於地圖的客戶互動

主要特色

  • 基於位置的即時店鋪展示
  • 可自訂地圖標記
  • 支援 Android、iOS 和 Web
  • 與 Flutter 的輕鬆整合
  • 可篩選的商店列表

適合對象

  • 零售應用
  • 服務提供者目錄
  • 物流和配送追蹤
  • 旅行和旅遊應用
  • 本地企業發現工具

使用建議

  • 需要設定地圖 API 金鑰
  • 僅限支援的平台
  • 依賴外部地圖服務
  • 可能需要處理位置存取權限
  • 性能取決於資料大小和網路速度

原始 README

以下為關聯原始碼儲存庫的 README 原文快照,最新內容請造訪原始碼儲存庫。

Store Locator for Flutter

pub package build

A Flutter package for showing map markers dynamically based on API calls that use Haversine distance or a similar location query.

Android iOS Web
Support SDK 24+ 14.0+ Any*

The example app running in Android

Installation

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

You also need to implement google_maps_flutter properly, check their guide

Import

You can import the package with:

import 'package:store_locator/store_locator.dart';

Example

StoreLocator<Store>(
  mapConfiguration: const MapConfiguration(
    initialCameraPosition: CameraPosition(
      target: LatLng(45.464211, 9.191383),
      zoom: 10,
    ),
  ),
  positionCallback: (position) async {
    Response response = await Dio().get('stores', queryParameters: {
      "latitude": position.latitude,
      "longitude": position.longitude,
    });
    if (response.statusCode == 200 || response.statusCode == 201) {
      return storesFromJson(response.data);
    }
    return [];
  },
  markerBuilder: (store) {
    return Marker(
      markerId: MarkerId(store.id.toString()),
      position: LatLng(store.latitude, store.longitude),
      infoWindow: InfoWindow(
        title: store.name,
        snippet: store.city,
      ),
    );
  },
)

See the example directory for a complete sample app.

Support

If this plugin was useful to you, helped you to deliver your app, saved you a lot of time, or you just want to support the project, I would be very grateful if you buy me a cup of coffee.

Buy Me A Coffee

License

MIT

所屬分類

依賴

依賴清單 1 項

原始碼儲存庫

使用此套件的專案

暫無相關資料。