undoLocalEdits method

Future<void> undoLocalEdits()

Undoes all of the local edits since the last server acknowledgment.

ServiceFeatureTable.undoLocalEdits is meant to be used for single table workflows or tables without geodatabase behavior (see below). If the service which the table belongs to has geodatabase behavior (see below), it is highly recommended to use ServiceGeodatabase.undoLocalEditsAsync(). Undoing edits in one table can cause data inconsistencies between the local cache and the service if ServiceFeatureTable.undoLocalEdits is used.

For example, when tables have a composite relationship, undoing only the origin feature would violate the composite relationship rule that an origin and destination feature must be either deleted together or not at all.

Areas which have geodatabase behavior:

  • Composite relationships
  • Annotation feature layers
  • Utility network association deletion semantics
  • Attribute rules

Return Value: A Future that has no return value.

Implementation

Future<void> undoLocalEdits() {
  final taskHandle = _withThrowingErrorHandler((errorHandler) {
    return runtimecore.RT_ServiceFeatureTable_undoLocalEdits(
        _handle, errorHandler);
  });
  return taskHandle.toFuture((_) {});
}