Skip to main content
Large datasets

Server-side paging for large Flutter data grids

Let the adapter execute the query where the data lives while FDC keeps the Flutter side dataset-driven and the active grid state coherent.

COMMUNITY + PRO PREVIEWCommunity foundation with optional Pro capabilities

The core workflow is available in Community. Items marked Pro preview belong to flutter_data_components_pro and are not currently distributed through pub.dev.

DATASET PAGING

Paging belongs to FdcDataSet, not to a visual slice of loaded rows.

The dataset requests a page-sized result from its adapter. Standard mode replaces the active page and can require an exact total count; infinite mode appends sequential windows as scrolling approaches the loaded boundary.

Filters, sorting, and search restart the query against the complete source. They do not operate only on whatever rows happen to be in client memory.

final orders = FdcDataSet(
fields: orderFields,
adapter: orderAdapter,
paging: const FdcDataPagingOptions(
enabled: true,
mode: FdcDataPagingMode.standard,
pageSize: 50,
maxPageSize: 200,
requireTotalCount: true,
),
);
SERVER OPERATIONS

Translate typed query state instead of shipping UI strings.

FDC filters refer to fields, operators, and typed values. Sorts retain explicit field order and direction. Global search, selection constraints, totals, and aggregates belong to the same query contract.

The adapter translates that contract into the source’s language—SQL clauses, HTTP parameters, a JSON request, a Workers binding, or an SDK call. UI code remains independent of transport syntax.

final result = await backend.openOrders(
offset: request.offset,
limit: request.limit,
filters: request.filters,
sorting: request.sorting,
globalSearch: request.globalSearch,
requireTotalCount: request.requireTotalCount,
);
ASYNC QUERY OWNERSHIP

Only the current query should be allowed to replace the dataset view.

A user can type a second search, change a filter, sort another column, or move pages before the previous request returns. A slower stale response must not overwrite the more recent result.

FDC coordinates dataset work and query state so records, current page, counts, aggregates, and loading indicators refer to the same request. Remote records still enter the normal edit buffer and post through the adapter when changed.

COMMUNITY FOUNDATION

Start with one dataset and one record lifecycle.

Install the Community package for the core workflow. Pro preview features are marked explicitly throughout this page.