What it does
nicetables gives a Flutter app a production data table in a few lines. You describe each column once, with a typed
value callback, and the table derives sorting, search, filtering, CSV export and the card layout for narrow screens from that single definition. Dark mode and brand colours come from
Theme.of(context) with no setup.
Features
- Typed columns: text, number, money, date, status, boolean, actions and custom columns, each with its own width policy.
-
One controller:
NiceTableControllerowns sort, search, filters, page, selection, expansion, column visibility and density. Pass your own to read or drive it, or let the table make one. -
Client or server data: client-side processing is automatic. For a backend,
NiceAsyncTabletakes afetchcallback and handles loading, errors and retries. - Toolbar: title and live row count, search, filter chips, a column picker, a density menu, CSV export and refresh, which can show your app's own loader while the table reloads. With rows selected it becomes a bulk-action bar.
- Footer: a rows-per-page menu, numbered pages with the current one highlighted and a go-to-page field.
- Rows and columns: hover, selected and striped states, expandable detail panels, pinned leading columns and drag-to-resize handles.
- Keyboard: arrow keys, Home/End, PageUp/PageDown, Space to select and Enter to open.
- Responsive: below a breakpoint, rows become cards.
-
Themed and localisable:
NiceTableThemeis aThemeExtensionderived from yourColorScheme, and every piece of text the table draws lives inNiceTableStrings. - Accessible: semantic labels on sort buttons, checkboxes and rows, and contrast-checked status colours.
- Pure Flutter: no native code and no dependencies beyond
meta.
Install
flutter pub add nicetables
Requires Flutter 3.27 or newer.
Use it
import 'package:nicetables/nicetables.dart';
NiceTable<Order>(
title: 'Orders',
rows: orders,
columns: [
NiceColumn.text('id', 'Order', (o) => o.id, mono: true),
NiceColumn.text('customer', 'Customer', (o) => o.customer),
NiceColumn.status('status', 'Status', (o) => o.statusValue),
NiceColumn.money('total', 'Total', (o) => o.total),
NiceColumn.date('placed', 'Placed', (o) => o.placedAt),
],
selectionMode: NiceSelectionMode.multi,
onRowTap: openOrder,
)
For data that lives on a server, swap in NiceAsyncTable:
NiceAsyncTable<Order>(
fetch: (q) async {
final page = await api.orders(
offset: q.offset,
limit: q.pageSize,
search: q.search,
);
return NicePage(rows: page.items, total: page.total);
},
columns: columns,
)
The full API is documented on pub.dev.





