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

套件詳情v1.0.0

flutter_use_geolocation

適用於 Flutter 應用的地理定位鈎子。提供 useGeolocation 鈎子,用於 GPS 追蹤、位置更新以及具權限處理的位置感知功能。

AndroidiOSWebmacOSWindows
近 30 天下載
38
喜歡數
0
Pub 分數
150

安裝套件

flutter pub add flutter_use_geolocation

套件介紹

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

一個 Flutter 套件,為建構位置感知應用提供地理定位鈎子。它提供了一個 useGeolocation 鈎子,可簡化 GPS 追蹤、即時位置更新以及跨平台的位置權限處理。專為使用 Flutter Use 生態系統的開發者設計,將複雜的原生互動抽象為簡單、反應式的 Dart API。該套件支援 Android、iOS、Web、macOS 和 Windows,可在跨平台應用中實現一致的地理定位功能。

適用情境

  • 即時位置追蹤
  • 基於位置的使用者介面
  • 權限管理的GPS存取
  • 跨平台地理定位功能
  • 背景位置監控

主要特色

  • 反應式地理位置狀態
  • 內建權限處理
  • 跨平台相容性
  • 基於鉤子的簡單 API
  • 即時位置更新

適合對象

  • 使用 Flutter 的開發者
  • 需要位置服務的應用
  • 跨平台行動與桌面應用
  • 即時位置功能
  • 基於位置的 UI 反應式更新

使用建議

  • 需要正確的應用權限
  • 可能影響電池壽命
  • Web 支援取決於瀏覽器功能
  • macOS 與 Windows 需要額外的設定
  • 精度取決於裝置硬體

原始 README

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

flutter_use

flutter_lints
Inspired by react-use.


A collection of Flutter Hooks inspired by React's react-use library. This monorepo contains multiple packages providing different categories of hooks for Flutter development.

📦 Packages

Package Description Version
flutter_use Core hooks library with essential utilities pub package
flutter_use_audio Audio playback and control hooks pub package
flutter_use_battery Battery state monitoring hooks pub package
flutter_use_geolocation Location and permission hooks pub package
flutter_use_network_state Network connectivity hooks pub package
flutter_use_sensors Device sensors hooks pub package
flutter_use_video Video playbook hooks pub package

🚀 Installation

For the core package:

flutter pub add flutter_use

For specialized packages:

flutter pub add flutter_use_audio    # Audio hooks
flutter pub add flutter_use_battery  # Battery hooks
# ... and so on

🌐 Interactive Demo Site

Try out all hooks with live examples at: https://wasabeef.github.io/flutter_use/

📚 Hooks by Category

📱 Mobile-first Hooks

Core package: flutter_use

  • useAsync — manages async operations with loading, data, and error states.
  • useDebounceFn — debounces function calls for better performance.
  • useInfiniteScroll — implements infinite scrolling with automatic loading.
  • useForm — comprehensive form state management with validation.
  • useKeyboard — tracks keyboard visibility and manages layouts (mobile only).
🎭 State Management

Core package: flutter_use

⏱️ Timing & Animation

Core package: flutter_use

🔄 Side Effects & Performance

Core package: flutter_use

🎯 UI Interactions

Core package: flutter_use

♻️ Lifecycle Management

Core package: flutter_use

🎨 Development & Debugging

Core package: flutter_use

  • useLogger — logs in console as component goes through life-cycles.
📱 Device Sensors

Package: flutter_use_sensors

Core package: flutter_use

🔋 Device Information

Package: flutter_use_battery

Package: flutter_use_geolocation

  • useGeolocation — tracks geo location and permission state of user's device. geolocator

Package: flutter_use_network_state

🎵 Media

Package: flutter_use_audio

  • useAudio — plays audio and exposes its controls. just_audio

Package: flutter_use_video

🚧 Coming Soon

  • useEvent — subscribe to events.
  • useFullscreen — display an element or video full-screen.
  • usePageLeave — triggers when mouse leaves page boundaries.
  • usePermission — query permission status for apps APIs.
  • useMethods — neat alternative to useReducer.
  • useSetState — creates setState method which works like this.setState.
  • usePromise — resolves promise only while component is mounted.
  • useObservable — tracks latest value of an Observable.



Unlicense — public domain.



所屬分類

依賴

依賴清單 2 項

原始碼儲存庫

使用此套件的專案

暫無相關資料。