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

套件詳情v14.1.2

geolocator

Flutter 的地理定位外掛程式。此外掛程式為通用位置(GPS 等)功能提供跨平台(iOS、Android)API。

AndroidiOSWebmacOSWindowsLinux
近 30 天下載
318萬
喜歡數
6140
Pub 分數
160

安裝套件

flutter pub add geolocator

套件介紹

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

geolocator 套件是一個跨平台的 Flutter 插件,為 Android、iOS、Web、macOS、Windows 和 Linux 上的裝置位置服務提供統一的 API。它讓開發者能夠以一致的行為取得目前位置、監控位置變更以及檢查位置權限。此套件由 Baseflow 開發,可簡化在 Flutter 應用中整合 GPS 及其他基於位置的功能。

適用情境

  • 獲取使用者的目前位置
  • 監控即時位置更新
  • 檢查位置權限
  • 建構位置感知的應用程式
  • 與地圖和導航整合

主要特色

  • 跨平台相容性
  • 即時位置追蹤
  • 權限處理
  • 高精度模式支援
  • 後台位置更新

適合對象

  • 行動和桌面位置應用
  • 配送和拼車應用
  • 健身與戶外追蹤應用
  • 基於位置的通知
  • 地圖整合應用

使用建議

  • 需要正確的權限配置
  • 背景位置可能會影響電池壽命
  • 準確性取決於設備硬體
  • Web 支援僅限瀏覽器地理定位
  • iOS 需要在 Info.plist 中包含使用說明

原始 README

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

Flutter geolocator plugin

The Flutter geolocator plugin is built following the federated plugin architecture. A detailed explanation of the federated plugin concept can be found in the Flutter documentation. This means the geolocator plugin is separated into the following packages:

  1. geolocator: the app facing package. This is the package users depend on to use the plugin in their project. For details on how to use the geolocator plugin you can refer to its README.md file.
  2. geolocator_android: this package contains the endorsed Android implementation of the geolocator_platform_interface and adds Android support to the geolocator app facing package. More information can be found in its README.md file;
  3. geolocator_apple: this package contains the endorsed iOS and macOS implementations of the geolocator_platform_interface and adds iOS and macOS support to the geolocator app facing package. More information can be found in its README.md file;
  4. geolocator_web: this package contains the endorsed web implementation of the geolocator_platform_interface and adds web support to the geolocator app facing package. More information can be found in its README.md file;
  5. geolocator_windows: this package contains the endorsed Windows implementation of the geolocator_platform_interface and adds Windows support to the geolocator app facing package. More information can be found in its README.md file;
  6. geolocator_platform_interface: this package declares the interface which all platform packages must implement to support the app-facing package. Instructions on how to implement a platform package can be found in the README.md of the geolocator_platform_interface package.

所屬分類

依賴

依賴清單 6 項

  • geolocator_android^5.1.0
  • geolocator_apple^2.3.14
  • geolocator_linux^0.2.6
  • geolocator_platform_interface^4.4.0
  • geolocator_web^4.1.4
  • geolocator_windows^0.2.3

原始碼儲存庫

使用此套件的專案

所在榜單