applyEdits method

Future<List<FeatureTableEditResult>> applyEdits()

Applies all local edits in all tables to the service.

This method applies all feature table edits to the feature service as a single transaction. If one of the edits fails, all edits are rolled-back, and geodatabase integrity is preserved. This is the recommended approach to applying edits and is typically more efficient than calling ServiceFeatureTable.applyEdits on each table.

However, this method can only succeed if all tables either support or do not support global IDs. A mix of global ID support is not permitted and will result in ArcGISExceptionType.geodatabaseGlobalIdSupportMismatch.

Use ArcGISFeatureServiceInfo.canUseServiceGeodatabaseApplyEdits to determine whether you can successfully apply your edits through this method.

Return Value: A Future that returns a List containing FeatureTableEditResult.

Implementation

Future<List<FeatureTableEditResult>> applyEdits() {
  final taskHandle = _withThrowingErrorHandler((errorHandler) {
    return runtimecore.RT_ServiceGeodatabase_applyEditsAsync(
      _handle,
      errorHandler,
    );
  });
  return taskHandle.toFuture(
    (element) => element.getValueAsList()!,
  );
}