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

套件詳情v0.8.1

flutter_compass

一個 Flutter 指南針。航向範圍為 0-360,0 表示正北。

AndroidiOS
近 30 天下載
10.5萬
喜歡數
191
Pub 分數
150

安裝套件

flutter pub add flutter_compass

套件介紹

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

一個 Flutter 套件,提供對裝置羅盤感應器的存取,可即時取得 0 到 360 度的方向值,其中 0 代表北方。它讓應用程式能利用裝置內建的磁力計偵測方向方位。此套件相容於 Android 與 iOS 平台,並可順暢整合至 Flutter 應用程式中。開發者可使用它來建立導航工具、擴增實境功能,或任何需要方向感知的應用。

適用情境

  • 導航應用
  • 增強現實體驗
  • 方向性使用者介面指示器
  • 戶外活動追蹤
  • 基於地圖的應用程式

主要特色

  • 即時航向更新
  • 0-360度方向
  • 跨平台支援(Android 與 iOS)
  • 簡單 API 結合
  • 基於磁力計的感測

適合對象

  • 開發位置感知應用程式的開發者
  • 需要即時方向資料的應用程式
  • 地理教育工具
  • 徒步和戶外導航應用

使用建議

  • 需要配備磁力計的設備
  • 在某些環境中可能需要校準
  • 準確性可能受到磁干擾的影響
  • 沒有傳感器的設備功能受限

原始 README

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

flutter_compass

pub package

A Flutter compass. The heading varies from 0-360, 0 being north.

Note: Android Only: null is returned as direction on android when no sensor available.

Usage

To use this plugin, add flutter_compass as a dependency in your pubspec.yaml file. For example:

dependencies:
  flutter_compass: '^0.8.1'
iOS

Make sure to add keys with appropriate descriptions to the Info.plist file.

  • NSLocationWhenInUseUsageDescription
  • NSLocationAlwaysAndWhenInUseUsageDescription

:memo: Reference example code

Android

Make sure to add permissions to the app/src/main/AndroidManifest.xml file.

  • android.permission.INTERNET
  • android.permission.ACCESS_COARSE_LOCATION
  • android.permission.ACCESS_FINE_LOCATION

:memo: Reference example code

Recommended support plugins

:memo: Reference example code

所屬分類

原始碼儲存庫

使用此套件的專案