FLUTTER ECOSYSTEM

holding_gesture

一個自訂的 GestureDetector,可在按住特定 Widget 時觸發動作。

最新版本
1.2.0
近 30 天下載
9600
喜歡數
49
Pub 分數
150

Package Overview

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

套件概覽

holding_gesture 套件提供了一個自訂的 GestureDetector,當使用者在特定組件上按住一段指定時間時觸發動作。它擴展了 Flutter 內建的 GestureDetector,具備專用的按住偵測功能,可實現回應式且直覺的互動,例如長按選單、拖曳啟動或情境敏感控制。此套件輕量且相容於所有主要平台,包含行動裝置、網頁與桌面。它簡化了基於按住手勢的實作,無需撰寫重複程式碼。

適用情境
  • Long-press context menus
  • Gesture-based navigation triggers
  • Interactive widget activation
  • Drag start detection
  • Customizable hold duration
  • Accessibility-enhanced controls
主要特色
  • Precise hold duration control
  • Cross-platform compatibility
  • Simple API integration
  • Configurable hold delay
  • Built-in callback handling
  • Minimal performance overhead
適合對象
  • Developers building interactive UIs
  • Apps requiring long-press functionality
  • Cross-platform Flutter projects
  • Accessibility-focused interfaces
  • Gesture-heavy applications
使用建議
  • Requires careful timing configuration
  • May conflict with other gesture detectors
  • Not suitable for rapid tap sequences
  • Needs testing on all target platforms
  • Limited to single-widget hold detection
  • Depends on Flutter's gesture system stability
支援平台AndroidiOSWebmacOSWindowsLinux

安裝套件

flutter pub add holding_gesture

所屬分類

原始碼儲存庫

相關專案