registerSyncEnabledGeodatabase method

Future<void> registerSyncEnabledGeodatabase(
  1. {required Geodatabase geodatabase}
)

Registers a copy of a sync-enabled geodatabase with an ArcGIS feature service to allow the copy to sync changes.

This method is typically used as part of services pattern workflow, sometimes known as a pre-planned workflow. A sync-enabled geodatabase is generated centrally and not modified or synced. Copies of this original geodatabase are distributed and loaded onto each user's device. The copy must first be registered with the service to allow the server to identify changes in subsequent sync operations. One of the main benefits of this workflow is a reduction in server load to generate geodatabases for many clients. It is important not to sync the copy before registering to ensure the server can maintain consistent state on each copy. This operation is not the opposite of GeodatabaseSyncTask.unregisterGeodatabase which is used to remove a geodatabase from the service prior to deletion.

Parameters:

  • geodatabase — a geodatabase to register.

Return Value: Returns a task that registers a geodatabase with the service.

Implementation

Future<void> registerSyncEnabledGeodatabase(
    {required Geodatabase geodatabase}) {
  final taskHandle = _withThrowingErrorHandler((errorHandler) {
    return runtimecore
        .RT_GeodatabaseSyncTask_registerSyncEnabledGeodatabaseAsync(
            _handle, geodatabase._handle, errorHandler);
  });
  return taskHandle.toFuture((_) {});
}