FLUTTER ECOSYSTEM

atreeon/atreeon_datagrid_responsive

一個內建排序和篩選功能且具備響應式特性的資料表格。

atreeon_datagrid_responsive 專案封面
Stars
3
Forks
1
最近推送(UTC)
2026年5月21日
專案狀態
未封存
Adrian GitHub avatar
GITHUB User

Adrian ↗

語言DartShell

此儲存庫發佈的套件

使用的依賴

依賴清單 10 項

原始 README

以下為英文專案原文快照,最新內容請造訪 GitHub。

展開 / 收合專案 README

atreeon_datagrid_responsive

A datagrid with sorting and filtering capabilities. It is also responsive to screen size. Fully Typed.

atreeon_datagrid_responsive example

Simple Demo

see examples folder for more examples

class SimpleDemo extends StatelessWidget {
  Widget build(BuildContext context) {
    return Scaffold(
      body: Column(
        children: [
          Expanded(
            child: ResusableDatagridW<Item>(
              data: originalData,
              fields: [
                Field<Item>((x) => x.name, "name", FilterFieldString()),
                Field<Item>((x) => ramLookup[x.ram] ?? x.ram.toString(), "ram", FilterFieldNum()),
                Field<Item>((x) => x.price, "price", FilterFieldNum()),
                Field<Item>((x) => x.storage, "storage", FilterFieldNum()),
              ],
              onRowClick: (x) => print(x.toString()),
              lastSaveDate: null,
            ),
          ),
        ],
      ),
    );
  }
}

class Item {
  String name;
  int ram;
  int price;
  int storage;

  Item(this.name, this.ram, this.price, this.storage);
}

var originalData = List<Item>.generate(
    2000,
    (i) => //
        Item("id: $i", i * 2, i ~/ 2, i + 500));

var ramLookup = {64: "sixtyfour", 1: "one", 128: "one hundred & twenty eight"};


Features

  • multi select over multiple pages
  • sorting and secondary sort capabilities
  • typed filtering
  • vertical responsive design (or fixed height)
  • paging or no paging

Limitations

  • no cell editing capability (you can open a dialog on click of a row though)
  • some data types aren't yet supported (DateTime)
  • no grouping
  • no reording column placement
  • no widening or narrowing of column widths

Other Notes / Information

written a couple of years ago