一個可自訂的 Flutter ExpansionTile 版本,源自 Material 實作,提供對外觀和行為的增強控制。它允許開發者自訂圖塊的視覺元素,例如圖示、顏色和動畫,同時維持可展開內容區段的核心功能。非常適合建立具有可摺疊內容的動態、使用者友善介面。
適用情境
可自訂的摺疊面板
動態表單部分
互動式常見問題解答顯示
嵌套可展開列表
帶可摺疊選項的設定面板
主要特色
完全可自定義的標題
可調節的動畫持續時間
支援自定尾端圖示
可擴展的主題整合
可設定的展開狀態
適合對象
需要靈活擴展瓷磚的開發人員
UI 設計師想要獨特的磚塊樣式
具有複雜可摺疊佈局的應用程式
需要在圖塊之間保持一致主題的項目
使用建議
需要手動處理狀態管理
有限的平台特定優化
可能稍微增加封包大小
不適合簡單的靜態擴展
依賴上游 Material 設計規範
原始 README
以下為關聯原始碼儲存庫的 README 原文快照,最新內容請造訪原始碼儲存庫。
configurable_expansion_tile
A Configurable Expansion Tile edited from the flutter material implementation
that allows for customization of the internal components. Includes providing colours,
replacement widgets on expansion, and custom animations.
Tile animations still takes place (which are also configurable), and a widget can be set to precede and/or follow the provided header, which will rotate on expand/collapse of the tile.
Configure any or all parameters or leave default behaviour - header works out of the box.
Installation
In the dependencies: section of your pubspec.yaml, add the following line: