applyEdits method
Uploads any changes to the local table to the feature service.
ServiceFeatureTable.applyEdits is meant to be used for single table
workflows or tables without geodatabase behavior (see below). If an edit
on this table can cause an edit to another table due to geodatabase
behavior, it is highly recommended to use
ServiceGeodatabase.applyEditsAsync()
instead to prevent data
inconsistency, so that dependent edits are all applied or none are (if an
error occurs).
For example, when tables have a composite relationship, applying the delete of a destination feature in a composite relationship deletion will only delete the destination feature on the server, therefore causing inconsistency in the data.
Areas which have geodatabase behavior:
- Composite relationships
- Annotation feature layers
- Utility network association deletion semantics
- Attribute rules
Return Value: A Future that returns a List
containing
FeatureEditResult types.
Implementation
Future<List<FeatureEditResult>> applyEdits() {
final taskHandle = _withThrowingErrorHandler((errorHandler) {
return runtimecore.RT_ServiceFeatureTable_applyEdits(
_handle, errorHandler);
});
return taskHandle.toFuture((element) => element.getValueAsList()!);
}