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

套件詳情v1.0.0

configurable_expansion_tile

一個可設定的展開項目,由 Flutter Material 實現修改而來,允許自訂

近 30 天下載
115
喜歡數
65
Pub 分數
40

安裝套件

flutter pub add configurable_expansion_tile

套件介紹

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

一個可自訂的 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:

configurable_expansion_tile: <latest_version>

Usage

import 'package:configurable_expansion_tile/configurable_expansion_tile.dart';

class MyWidget extends StatelessWidget {
  Widget build(BuildContext context) {
    return ConfigurableExpansionTile(
      headerExpanded: Flexible(child: Center(child: Text("A Header Changed"))),
      header: Container(child: Center(child: Text("A Header"))),
      children: [
        Row(
          children: <Widget>[Text("CHILD 1")],
        ),
        // + more params, see example !!
      ],
    );
  }
}

Example

View the Flutter app in the example directory.

Screenshot

Tile Collapsed

Tile Expanded

Contributors

所屬分類

原始碼儲存庫

使用此套件的專案

暫無相關資料。