SummerDataTable class

A high-performance, antd/naive-style data table.

Design highlights

  • Vertical virtualization via ListView.builder — only visible rows are built, with momentum physics, scrollbar and mouse-wheel for free.
  • Horizontal scroll via a shared offset notifier driving a single render-object translate (_XTranslatedBox) — X scrolling repaints without rebuilding any cell widget. Pinned columns are non-translated siblings.
  • Fixed header, fixed left/right columns, single + multi-column sorting (Shift+click), row selection, expandable rows, column resize, column filtering dropdown, tree/hierarchical data, ellipsis + tooltip, hover/selection highlight, loading/empty states, pagination.
Inheritance

Constructors

SummerDataTable({Key? key, required List<SummerDataColumn> columns, required SummerDataTableSource source, SummerDataTableThemeData? theme, double? height, double? width, bool isLoading = false, bool isEmpty = false, bool showHeader = true, bool bordered = true, bool showHover = true, String? sortColumnKey, bool sortAscending = true, SummerSortChange? onSortChange, List<SummerSortSpec>? sortColumns, SummerMultiSortChange? onMultiSortChange, Map<String, List<Object?>>? filteredColumnValues, SummerFilterChange? onFilterChange, SummerRowSelection? selection, SummerRowExpandable? expandable, ValueChanged<int>? onRowTap, ValueChanged<int>? onRowLongPress, ValueChanged<int>? onRowDoubleTap, int? currentPage, int? totalPages, VoidCallback? onNextPage, VoidCallback? onPreviousPage, ValueChanged<int>? onPageTap, Widget? footer})
const

Properties

bordered bool
Whether to draw outer + inner borders.
final
columns List<SummerDataColumn>
Column definitions.
final
currentPage int?
Current page index (0-based). Null disables pagination.
final
expandable SummerRowExpandable?
Expandable rows configuration (detail panel under a row). null disables.
final
filteredColumnValues Map<String, List<Object?>>?
Selected filter values per column key.
final
Optional footer row rendered below the body and above pagination. The caller is responsible for laying out its own content (typically a Row of summary cells sized to match column widths). When non-null the table wraps it with a top border and the header background color for visual consistency.
final
hashCode int
The hash code for this object.
no setterinherited
height double?
Fixed height. Enables vertical scrolling when content overflows.
final
isEmpty bool
Empty state (also triggers when the source has zero rows).
final
isLoading bool
Loading state.
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
onFilterChange SummerFilterChange?
Called when a column's filter selection is applied/reset.
final
onMultiSortChange SummerMultiSortChange?
Called when the user changes the sort set. Enabling this activates multi-sort (Shift+click to stack columns).
final
onNextPage VoidCallback?
final
onPageTap ValueChanged<int>?
final
onPreviousPage VoidCallback?
final
onRowDoubleTap ValueChanged<int>?
final
onRowLongPress ValueChanged<int>?
final
onRowTap ValueChanged<int>?
Row interaction callbacks (index is the data row index).
final
onSortChange SummerSortChange?
Called when the user cycles a sortable header (single-sort mode).
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
selection SummerRowSelection?
Row selection configuration. null disables selection.
final
showHeader bool
Whether to render the header row.
final
showHover bool
Whether hovering a row highlights its background.
final
sortAscending bool
Direction of the single active sort. Ignored when sortColumnKey is null.
final
sortColumnKey String?
Active sort column key, or null. Ignored when onMultiSortChange is set.
final
sortColumns List<SummerSortSpec>?
Active multi-sort specs in priority order. Used when onMultiSortChange is set (which also switches the header to multi-sort mode).
final
source SummerDataTableSource
Data source (owned by the caller; call notifyListeners on change). Use a SummerTreeTableSource to enable tree mode.
final
theme SummerDataTableThemeData?
Theme overrides. Falls back to SummerDataTableTheme.of then default.
final
totalPages int?
Total number of pages. Null disables pagination.
final
width double?
Fixed width. Enables horizontal scrolling when content overflows.
final

Methods

createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() State<SummerDataTable>
Creates the mutable state for this widget at a given location in the tree.
override
debugDescribeChildren() List<DiagnosticsNode>
Returns a list of DiagnosticsNode objects describing this node's children.
inherited
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toDiagnosticsNode({String? name, DiagnosticsTreeStyle? style}) DiagnosticsNode
Returns a debug representation of the object that is used by debugging tools and by DiagnosticsNode.toStringDeep.
inherited
toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) String
A string representation of this object.
inherited
toStringDeep({String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug, int wrapWidth = 65}) String
Returns a string representation of this node and its descendants.
inherited
toStringShallow({String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) String
Returns a one-line detailed description of the object.
inherited
toStringShort() String
A short, textual description of this widget.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited