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

套件詳情v3.3.2

configurable_expansion_tile_null_safety

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

AndroidiOSWebmacOSWindowsLinux
近 30 天下載
4810
喜歡數
26
Pub 分數
140

安裝套件

flutter pub add configurable_expansion_tile_null_safety

套件介紹

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

一個可自訂的 ExpansionTile 小部件,源自 Flutter 的 Material 實現,設計用於增強靈活性。支援空值安全,並允許開發者客製化小部件的外觀與行為,包括自訂標題、圖示和動畫控制。非常適合建立具有獨特樣式或互動元件的可摺疊內容區塊。此套件在所有主要平台皆相容,並透過額外的設定選項擴展標準 ExpansionTile。

適用情境

  • 自定義可摺疊UI組件
  • 表單中的動態內容區域
  • 互動式常見問題介面
  • 嵌套可展開列表
  • 可存取的導航面板

主要特色

  • 完全空安全
  • 可擴充的標題自訂
  • 可設定的動畫與圖示行為
  • 支援所有 Flutter 平台
  • 與現有組件的輕鬆整合

適合對象

  • 需要靈活擴展面板的開發者
  • UI 設計師需要視覺控制
  • 具有複雜可展開內容的應用程式
  • 跨平台應用
  • 使用現代 Dart 練習的專案

使用建議

  • 需要理解 Flutter widget 樹
  • 可能稍微增加封包大小
  • 限於材質設計規範
  • 不適用於非擴展使用案例
  • 依賴上游 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"))),
      childrenBody: Row(
        children: <Widget>[Text("CHILD 1")],
      ),
    );
  }
}

Example

View the Flutter app in the example directory.

Screenshot

Tile Collapsed

Tile Expanded

Contributors

所屬分類

原始碼儲存庫

使用此套件的專案

暫無相關資料。