Choosing a Flutter data table
Flutter has several good ways to show tabular data. The right one depends mostly on three questions: how many rows, how much users need to do with them, and what licence you can use. This page is written by the author of fitgrid, so it says plainly where another package is the better choice.
The short answer
| You need | Reach for |
|---|---|
| A small, read-only table (tens of rows) in a Material app | Flutter's built-in DataTable |
The DataTable API, plus a fixed header and fixed columns | data_table_2 |
| You already use the Syncfusion suite, or want commercial support | Syncfusion DataGrid |
| Thousands to millions of rows, columns sized to content, spreadsheet-style editing, no dependencies, MIT licence | fitgrid |
PlutoGrid is also a feature-rich option that many teams use; compare its current feature list and maintenance activity on pub.dev against your needs.
Flutter's DataTable
Built in, familiar, and fine for small tables. It lays out every row, so it
is not meant for large datasets; PaginatedDataTable helps by
showing a page at a time. Column widths come from the layout of the cells you
build.
data_table_2
Described by its author as an in-place substitute for DataTable
and PaginatedDataTable with a sticky header, fixed top rows and
fixed left columns. A good upgrade when your code already uses the
DataTable API.
Syncfusion DataGrid
A mature, full-featured grid from a commercial vendor, part of a large component suite. It requires a Syncfusion licence; a free community licence is offered to qualifying individuals and small companies — check their current terms before adopting it.
fitgrid
fitgrid is built around two decisions:
- Columns measure their content. Instead of choosing pixel widths, a column sizes itself from its text — with clamps, flex and fixed widths when you want them. Measurement samples the longest candidates, so it stays fast on huge datasets.
- Cells are painted, not built. A block of text cells is one render object with cached text painters. The work per frame tracks the viewport, not the dataset: a million rows scroll like a hundred. Real widgets are still available for the cells that need them, built only while visible.
On top of that it has what users expect from a spreadsheet-like grid: multi-column sort, typed filters with a UI, a column menu and chooser, frozen columns, cell ranges with copy, paste, a fill handle and undo, grouping with sticky headers, tree and detail rows, header bands, infinite scroll, server-backed rows, charts in cells, pivots, CSV/TSV/xlsx export, saved layouts, a real accessibility tree and right-to-left — with no dependency beyond Flutter.
flutter pub add fitgrid_table
See the live demo and the full guide.
What fitgrid does not do
- It is not a drop-in replacement for the
DataTableAPI. find.textcannot see painted cells in widget tests; the package shipstesting.darthelpers instead.- There is no drag-and-drop pivot designer yet — pivots are built in code.
Package details change; check each package's pub.dev page for its current features and licence.