FLUTTER ECOSYSTEM

rect_getter

一個 widget 提供了一種簡單的方法,可在渲染後取得子項的矩形資訊。

rect_getter 封面
最新版本
1.1.0
近 30 天下載
9900
喜歡數
97
Pub 分數
160

Package Overview

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

套件概覽

RectGetter 是一個 Flutter 套件,可簡化在渲染後取得子組件矩形尺寸與位置的過程。它提供了一種方便的方法,用於存取精確的佈局資訊,例如偏移、大小和邊界,適用於組件樹中。非常適合需要準確空間資料的手勢檢測、動畫或 UI 對齊任務。該套件可在所有主要平台(包括 Android、iOS、Web、macOS、Windows 和 Linux)上運作,確保在不同目標環境中行為一致。

適用情境
  • Gesture-based interactions
  • Dynamic UI positioning
  • Animation triggers based on layout
  • Debugging widget placement
  • Overlay element alignment
主要特色
  • Real-time rectangle data after render
  • Cross-platform compatibility
  • Simple API integration
  • Supports nested widgets
  • Accurate offset and size reporting
適合對象
  • Developers needing layout metrics
  • UI/UX designers implementing interactive layouts
  • Apps with dynamic or responsive interfaces
  • Debugging layout issues
  • Custom gesture detectors
使用建議
  • Requires post-render access to widget tree
  • May impact performance if overused
  • Not suitable for immediate pre-render measurements
  • Limited to visible and rendered children
  • Best used in conjunction with build context
支援平台AndroidiOSWebmacOSWindowsLinux

安裝套件

flutter pub add rect_getter

所屬分類

原始碼儲存庫

相關專案