Examples
- Basic Usage
- With Sorting
- With Selection
- Border and Dividers

Simple data table with sortable columns.
Properties
Required
A list of column definitions that determine the table structure, headers, and sorting behavior.
A list of data rows to display in the table. Each row must have the same number of cells as there are columns.
Content
Callback function called when a row is tapped. Receives the row ID.
Callback function called when a row’s hover state changes. Receives the row ID and hover status.
Selection
Whether rows can be selected with checkboxes. When true,
onSelectionChanged
must be provided.The set of currently selected row IDs. Used to control the selection state.
Callback function called when the selection changes. Required when
isSelectable
is true.Sorting
The ID of the currently sorted column. Use with
sortDirection
to display sort indicators.The current sort direction for the sorted column. Shows appropriate sort icons in the header.
The default column to sort by when no explicit sort is applied. Must be used together with
defaultSortDirection
.The default sort direction for the default sort column.
Layout
Whether the table should expand to fill available space. When true, the table becomes scrollable if content exceeds the available area.
Whether to display a border around the entire table.
Whether to show horizontal divider lines between rows.
Whether to show vertical divider lines between columns.
Fixed height for all table rows in logical pixels. When provided, all rows will have this exact height regardless of content. This prevents table jitter when using
onRowHover
to show/hide elements like buttons that are larger than the default content height, ensuring consistent spacing and preventing visual jumping as users interact with rows.Column Properties
TheNeoTableColumn
class represents individual column definitions:
Required
A unique identifier for the column.
The display text for the column header.
Layout
The flex value determining the column’s relative width. Higher values take more space.
Sorting
Callback function called when this column’s sort state changes. Receives the column ID and new sort direction. When provided, makes the column sortable.
Row Properties
TheNeoTableRow
class represents individual data rows:
Required
A unique identifier for the row.
The content widgets for each cell in the row. Must match the number of columns in the table.
Enums
NeoTableSortDirection
Sort direction options for table columns.none
: No sorting appliedascending
: Sort from lowest to highest valuesdescending
: Sort from highest to lowest values
Best Practices
- Cell Count: Each row must have the same number of cells as there are columns in the table.
- Width Constraints: When using
isExpanded: true
, always provide width constraints by wrapping inExpanded
,ConstrainedBox
,SizedBox
, etc. - Row Navigation: Use
onRowTap
for navigation to detail pages or for row selection logic. This provides intuitive user interaction for accessing more information about table items. - Contextual Actions: Use
onRowHover
to show/hide action buttons (like delete icons) only when hovering over specific rows. This keeps the UI clean while making actions discoverable when needed. - Fixed Row Heights: When using
onRowHover
to show/hide interactive elements like buttons, usefixedRowHeight
to prevent table jitter. Without it, rows will resize when elements larger than the default content are shown, causing the table to jump around as users hover over rows.
Integration Notes
- Selection Logic: The table validates that all row IDs are unique and will assert in debug mode if duplicates are found.
- Sort Cycling: Sortable columns cycle through descending → ascending → none (or back to default) when clicked repeatedly.
- Default Sorting: When using default sorting, the default sort column cannot be completely unsorted—it cycles between descending and ascending only.