Saving Changes
There are two separate moments in a data editing workflow:
- Post the current record edit with
post(). - Apply pending cached updates to adapter storage with
applyUpdates()when cached updates are enabled.
That distinction is useful for business screens that let users make several changes before committing the batch to external storage.
customers.edit();
customers.setFieldValue('credit_limit', 50000);
customers.post();
final result = await customers.applyUpdates();
applyUpdates() returns an FdcDataApplyResult, allowing application code to inspect the adapter apply result.
For a simple local dataset created with loadRows, posted changes are committed to the dataset's own record store. There is no external adapter to call.
For adapter-backed datasets, persistence behavior follows the dataset update mode and adapter contract. The later Data Adapters guides will cover immediate and cached-update workflows in detail.
Where to go next
You now have the minimum FD Components workflow:
define fields → load or open data → bind UI → edit records → post → apply when required
Continue with the DataSet mental model, then follow the Core Concepts sequence through fields, records, state, editing lifecycle, change tracking, and data binding.