搜尋分類、套件與程式碼儲存庫

flutter_expandable_table 封面
套件詳情v2.3.0

flutter_expandable_table

用於建立可展開表格的 Flutter 小部件,包含固定表頭與第一欄。

AndroidiOSWebmacOSWindowsLinux
近 30 天下載
2290
喜歡數
178
Pub 分數
160

安裝套件

flutter pub add flutter_expandable_table

套件介紹

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

一個用於建立具有固定標題和第一欄的表格的 Flutter 小部件,支援無縫的垂直與水平捲動。它支援可擴展列以檢視詳細資料,同時在各個平台維持版面穩定。非常適合以響應式且使用者友善的方式顯示結構化資料。此套件相容於 Android、iOS、Web、macOS、Windows 與 Linux,適用於跨平台應用程式。

適用情境

  • 顯示帶有固定標題的大數據集
  • 建立可展開詳細資訊的互動式表格
  • 使用結構化數據構建管理儀表板
  • 顯示層次或嵌套資訊
  • 在多個平台上實現響應式資料網格

主要特色

  • 固定表頭和第一欄
  • 可展開的表格行
  • 跨平台相容性
  • 平滑滾動支援
  • 可自訂的樣式選項
  • 響應式版面設計

適合對象

  • 資料密集型應用
  • 管理面板和儀表板
  • 報告工具
  • 需要結構化資料顯示的行動與Web應用
  • 需要可重用表格組件的開發者

使用建議

  • 可能需要額外的樣式來適應複雜佈局
  • 處理極大資料集時的效能影響
  • 有限的內建分頁或篩選功能
  • 最適合中等大小的資料集
  • 需要仔細處理可展開列的狀態管理

原始 README

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

flutter_expandable_table

Expandable Table

Pub Package Pub Points Pub Likes

Package Issue Package License

ExpandableTable is a widget for Flutter that create a Table with header and first column fixed. You can create a nested Rows/Columns grouped in expandable Row/Column

Image
ExpandableTable

Features

  • Header and first column fixed
  • Supports vertical and horizontal scroll
  • Customizable animation Duration and Curve
  • Specific height definition for each single row
  • Specific width definition for each single column
  • Access to cell address when building cell content
  • Access to the parent rows and columns of the cell while building the contents of a cell

 

Usage

Make sure to check out the examples on GitHub.

Installation

Add the following line to pubspec.yaml:

dependencies:
  flutter_expandable_table: <last-release>
Basic setup

Complete example available here.

     return ExpandableTable(
      firstHeaderCell: ExpandableTableCell(
        child: Text('Simple\nTable'),
      ),
      headers: headers,
      rows: rows,
    );
Use with the controller

You can create an external controller to be able to dynamically manage the table, for example to add or remove rows within it.

Here is an example:

    //... Inside Widget State
    late ExpandableTableController controller;
    //....
    @override
    void initState() {
      controller = ExpandableTableController(
        firstHeaderCell: ExpandableTableCell(child: Container()),
        headers: [],
        rows: [],
        headerHeight: 263,
        defaultsColumnWidth: 200,
        firstColumnWidth: 300,
        scrollShadowColor: AppColors.black,
      );
      super.initState();
    }
    void _onEvent(){    
      controller.rows.add(...your code...);
    }
    @override
    Widget build(BuildContext context) {
      return ExpandableTable(
        controller: controller,
      );
    }
//....
ExpandableTable Properties
  • firstHeaderCell: Is the top left cell, i.e. the first header cell.
  • headers: contains the list of all column headers, each one of these can contain a list of further headers, this allows you to create nested and expandable columns.
  • rows: contains the list of all the rows of the table, each of these can contain a list of further rows, this allows you to create nested and expandable rows.
  • headerHeight: is the height of each column header, i.e. the first row.
  • firstColumnWidth: determines first Column width size.
  • defaultsColumnWidth: defines the default width of all columns, it is possible to redefine it for each individual column.
  • defaultsRowHeight: defines the default height of all rows, it is possible to redefine it for every single row.
  • duration: determines duration rendered animation of Rows/Columns expansion.
  • curve: determines rendered curve animation of Rows/Columns expansion.
  • scrollShadowDuration: determines duration rendered animation of shadows.
  • scrollShadowFadeInCurve: determines rendered curve animation of shadows appearance.
  • scrollShadowFadeOutCurve: determines rendered curve animation of shadows disappearance.
  • scrollShadowColor: determines rendered color of shadows.
  • scrollShadowSize: determines size of shadows.
  • visibleScrollbar: determines visibility of horizontal and vertical scrollbars.
  • trackVisibilityScrollbar: indicates that the scrollbar track should be visible.
  • thumbVisibilityScrollbar: indicates that the scrollbar thumb should be visible, even when a scroll is not underway.
  • expanded: indicates that the table expands, so it fills the available space along the horizontal and vertical axes.

 

📚 My open source projects

Flutter
Package Verison Score Likes Test Coverage
Pub Package Pub Points Pub Likes
Pub Package Pub Points Pub Likes
Pub Package Pub Points Pub Likes
Pub Package Pub Points Pub Likes
Dart
Package Verison Score Likes Test Coverage
Pub Package Pub Points Pub Likes Test CI codecov
Pub Package Pub Points Pub Likes Test CI codecov

所屬分類

依賴

依賴清單 3 項

原始碼儲存庫

使用此套件的專案

暫無相關資料。