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

smooth_compass 封面
套件詳情v2.0.17

smooth_compass

帶有動畫旋轉的平滑指南針,支援自訂組件(適用於 Android 和 iOS)

AndroidiOS
近 30 天下載
99
喜歡數
65
Pub 分數
140

安裝套件

flutter pub add smooth_compass

套件介紹

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

Smooth Compass 是一個 Flutter 套件,提供具動畫效果的平滑指南針介面,支援 Android 與 iOS。它利用裝置感應器偵測方向,並提供流暢的旋轉動畫,以實現精緻的使用者體驗。開發者可使用自訂組件來自訂指南針外觀,進而整合至多樣化的 UI 設計中。此套件輕量且易於實作,非常適合導航應用、戶外工具,或任何需要即時方向反饋的應用。

適用情境

  • 導航應用
  • 戶外活動追蹤
  • 增強現實介面
  • 遊戲中的方向指引
  • 基於地圖的應用程式

主要特色

  • 動畫指南針旋轉
  • 自定義小部件支援
  • 跨平台相容性(Android 與 iOS)
  • 即時感應器整合
  • 流暢的視覺過渡

適合對象

  • 開發導航功能的開發者
  • 需要即時方向感應的應用
  • 面向使用者介面的指南針實作
  • 跨平台移動應用

使用建議

  • 需要設備陀螺儀和磁力計
  • 可能需要處理傳感器的權限
  • 性能取決於裝置硬體
  • 僅限指南針功能

原始 README

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

Smooth Compass

Customizable flutter package to find direction using device motion sensors.

Image Image
SmoothCompass with default Widget SmoothCompass with custom Widget

Features

  • Extensive, yet easy to use
  • Preconfigured UI with customizable styling
  • Custom builder
  • Locale support
  • Smooth Rotation
  • Values in degrees

Usage

Make sure to check out examples

Installation

Add the following line to pubspec.yaml:

dependencies:
  smooth_compass: ^1.0.2
Basic setup

The complete example is available here.

SmoothCompass requires you to provide compassBuilder which returns:

  • degrees is the directional value.
  • turns is the value for compass rotation.
  • compassAsset the (default) widget for compass.

SmoothCompass Optional Arguments Height, Width, Duration and compassAsset:

  • compassAsset is the customizable widget for compass. if not provider default will shown.

Default Widget:

SmoothCompass(
 rotationSpeed: 200,
 height: 300,
 width: 300,
// compassAsset:CustomWidget(),   you custom compass widget here
 compassBuilder: (context,AsyncSnapshot<CompassModel>? compassData,Widget compassAsset){
   return compassAsset;
    },
  ),

Custom Widget:

SmoothCompass(
 rotationSpeed: 200,
 height: 300,
 width: 300,
  compassAsset:Container(
  height:200,
  width:200,
    decoration:BoxDecoration(
    shape:BoxShape.circle,
    image:DecorationImage(
    image:AssetImage("path for compass image"),
    fit:BoxFit.cover
   )
  ),
),
 compassBuilder: (context,AsyncSnapshot<CompassModel>? compassData,Widget compassAsset){
   return compassAsset;
    },
  ),
Support

for any queries or issue contact at:

  • alihadi5125@gmail.com
  • fadiktk000@gmail.com

所屬分類

依賴

依賴清單 3 項

原始碼儲存庫

使用此套件的專案

暫無相關資料。