This document details all the configurable properties available in TableViewEx.
- Scrollbar Customization
- Column Behavior
- Row & Cell Configuration
- Styling and Borders
- Selection Properties
- Core Functionality
scrollThumbColor: The color of the scrollbar thumb. Defaults toColors.grey.scrollThumbThickness: The thickness of the scrollbar thumb. Defaults to6.0.verticalThumbVisibility: Allows visibility control of the vertical scrollbar.horizontalThumbVisibility: Allows visibility control of the horizontal scrollbar.- Note: If both visibility properties are set to
false, the scrollbars will be completely hidden.
- Note: If both visibility properties are set to
columnDefinitions: A required list ofTableViewExColumnConfigobjects that define the structure, style, and behavior of each column.enableColumnWidthResize: A boolean to enable or disable column resizing by dragging. Defaults totrue.allowColumnReordering: A boolean to enable or disable column reordering via drag-and-drop. Defaults tofalse.resizingSeparatorWidth: The width of the draggable separator used for resizing columns. Defaults to3.0.contentMaxWidthProvider: An optional functiondouble Function(int colIndex)that provides the maximum width for a column's content. This is used for the auto-resize on double-tap feature.
rowCount: The required total number of rows in the table.rowSpanBuilder: A required functionSpanExtent Function(int)to build the height (SpanExtent) for each row.cellWidgetBuilder: A required functionWidget Function(BuildContext, TableVicinity)to build the widget for each individual cell in the table.rowBackgroundColorProvider: An optional functionColor Function(int rowIndex)to provide alternating or conditional background colors for rows.showHeader: A boolean that, whentrue, treats the first row as a pinned header. Defaults tofalse.
horizontalBorderSide: Defines theBorderSidefor the horizontal lines between rows. If omitted, no horizontal lines are drawn.verticalBorderSide: Defines theBorderSidefor the vertical lines between columns. If omitted, no vertical lines are drawn.
selectionMode: An optionalSelectionModeenum value (none,cell, orrow) that defines the selection behavior. Defaults toSelectionMode.none.selectedRowBackgroundColor: An optionalColorthat defines the background color of selected row. Only applicable whenselectionModeis set torow. It has no impact if theselectionModeiscell, as the content widget customization is out of scope of this widget. Check example on how to handlecellselection.
onSortRequested: An optional callbackvoid Function(int colIndex)that is triggered when a header is tapped, signaling a sort request.columnWidthCalculator: A required instance of aTableViewExWidthCalculatorimplementation, which is responsible for determining the initial widths of the columns. This package comes with a default implementation named asDefaultTableViewExWidthCalculatorfor use.