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

flutter_box_transform 封面
套件詳情v0.4.7

flutter_box_transform

box_transform 套件的 Flutter 實作,提供簡單的 2D 方塊變換操作以及 UI 中矩形的進階縮放功能。

AndroidiOSWebmacOSWindowsLinux
近 30 天下載
2.2萬
喜歡數
123
Pub 分數
160

安裝套件

flutter pub add flutter_box_transform

套件介紹

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

flutter_box_transform 是一個 Flutter 套件,可實現精確的 2D 矩形變換操作,簡化 UI 布局中矩形區域的處理。它支援對矩形進行高階縮放與幾何變換,非常適合動態 UI 元素、覆疊層與互動式元件。此套件專為跨平台使用設計,可在 Android、iOS、Web、macOS、Windows 與 Linux 上順暢運作。提供直覺的 API,僅需少量程式碼即可調整方塊的位置、縮放與旋轉。專為需要對視覺佈局幾何進行細緻控制的開發者所設計。

適用情境

  • 動態 UI 元素定位
  • 互動式覆蓋層設計
  • 響應式版面調整
  • 矩形的視覺變換
  • 跨平台 UI 一致性
  • 複雜形狀操作

主要特色

  • 2D框變換工具
  • 進階矩形調整大小
  • 跨平台相容性
  • 用於幾何運算的直覺式 API
  • 支援縮放、旋轉和平移
  • 內建對齊與偏移處理

適合對象

  • 需要精確佈局控制的UI開發人員
  • 設計實現互動式介面的設計師
  • 開發響應式或動畫版面的開發者
  • 使用複雜視覺效果構建跨平台應用的團隊
  • 需要即時矩形操作的應用程式

使用建議

  • 需要理解二維坐標系統
  • 最適合高階版面情境
  • 可能為簡單UI需求增加開銷
  • 僅限矩形變換,不支援任意形狀
  • 不適用於高頻率動畫迴圈

原始 README

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

Banner

Box Transform

Build Tests codecov

Box Transform provides packages that allows you to programmatically handle box resizing and dragging. It provides highly flexible, programmatically resizable and draggable boxes that can be used in any Dart or Flutter project.

Packages

Package Pub Description
box_transform Pub Version A pure Dart implementation for box transformation operations that does not rely on Flutter.
flutter_box_transform Pub Version A Flutter implementation that provides a flexible, customizable and easy to use interface tailored for Flutter projects.

Features

  • 📏 Dimension Constraining: Set maximum and minimum constraints to keep boxes within specific boundaries while resizing.
  • 🔁 Flipping Mechanics: Advanced positional-flipping when resizing hits extreme values with hard constraints.
  • 🔒 Drag Clamping: Specify clamping boxes to keep your transformable boxes within a specific region.
  • 🎨 Flexible Resizing Modes: Choose from four different resizing modes for more flexibility in how boxes are resized.
  • 📍 Customizable Anchor Points: Define resizing corner-handles to anchor different parts of the box when resizing.
  • 🎨 Customizable Handles: Use default resizing handles or define your own custom handles.
  • 🌀 Rotation Support: Rotate boxes around their center, with full rotated-aware drag, resize, flip, and clamping. Choose between BindingStrategy.originalBox (the unrotated logical rect stays in the clamp; rotated corners may extend outside) and BindingStrategy.boundingBox (the rendered axis-aligned footprint stays inside). Rotation gestures slide-then-freeze: when the requested angle would force the rect outside the clamp, the box slides into available slack first, then caps at the last feasible angle. Rotated force-flip also falls back to the natural direction when the flipped state can't fit, so the rect stays clamp-pinned instead of jumping or freezing.
  • 🚀 Easy Integration: Integrate Box Transform into your Dart or Flutter project with ease.

Getting Started

Go to the Getting Started page of the documentation to start using Box Transform.

Example App: box-transform-example.firebaseapp.com
Playground: box-transform-playground.firebaseapp.com

Documentation

Documentation is available at boxtransform.hyperdesigned.dev.

Contributing

See CONTRIBUTING.md for details.

See DEVELOPMENT.md for development setup.

Authors


Birju Vachhani

Saad Ardati

Feel free to join our Discord server for any inquiries or support!

License

Copyright © 2023 Hyperdesigned

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    https://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

所屬分類

依賴

依賴清單 2 項

原始碼儲存庫

使用此套件的專案