antd_table 1.0.0
antd_table: ^1.0.0 copied to clipboard
Ant Design v6 Table component for Flutter. Table with sorting, filtering, fixed columns/headers, row selection, merged cells, expandable rows, tree data, pagination, summary row and grouped headers, a [...]
Changelog #
1.0.0 #
Initial stable release of the standalone antd_table package.
Features #
- Generic table API:
AntTable<T>andAntTableColumn<T>consume the caller's own row model directly. There is noMaprow and nodataIndexstring lookup — every data access is a typed callback (rowKey,cell,sorter,onFilter,onCell,childrenOf,expandedRowRender,summary). - Sorting: click-to-cycle ascend → descend → cancel,
sortercomparator, initialdefaultSortOrder, controlledsortOrder, configurablesortDirections, and multi-column sorting throughsortPriority. - Filtering:
filters+onFiltermenus withfilterMultiple(checkbox) or single-select (radio) modes, initialdefaultFilteredValue, controlledfilteredValue, and confirm/reset actions. - Fixed columns (
AntTableFixed.left/right, inherited by group children) and fixed header viascrollY, with divider shadows. - Horizontal scrolling driven by
scrollX, implemented inside the component over aSingleChildScrollViewwith position-computed column pinning; no sliver dependency and no outer scroll-position coupling. - Virtual scrolling: with
scrollYset and more than 50 rows the body switches toListView.builder. - Merged cells through
AntTableColumn.onCellreturningAntTableCellSpan(rowSpan:, colSpan:), whererowSpan: 0hides the cell. - Expandable rows:
expandedRowRender,expandRowByClick,expandedRowKeys,defaultExpandAllRows,onExpandedRowsChange. - Tree data via
childrenOfwith indentation, per-level sorting/filtering, and selection cascade. - Row selection:
AntTableRowSelection<T>with controlled and uncontrolled keys,getCheckboxPropsfor disabled rows, customselectionsentries,checkStrictly,hideSelectAll, configurable column width and pinning, select-all with half-checked state. - Pagination (
pagination,pageSize,onPageChange), summary footer (summary+AntTableSummaryCellwithcolSpan), and multi-level grouped headers (AntTableColumn.children). - Presentation:
size(large/middle/small),bordered,loading,emptyplaceholder,ellipsis,align, and default column width of 120 for columns without an explicit width.
Notes #
- Leaf columns must provide
cell; group columns must provide non-emptychildren— both are enforced by assertions at build time. - Sorting, filtering and pagination operate client-side on
dataSource; server-driven tables should drive rows externally and observeonSortChange/onFilterChange/onPageChange. rowKeyfalls back to the row index when omitted; an explicit key is required for stable expansion and selection across reorders.- Not included in 1.0.0: column resizing, editable cells, column virtualization, sliver variants.