createDefaultSyncGeodatabaseParameters method
- {required Geodatabase geodatabase}
Creates default parameters to synchronize a geodatabase using the SyncGeodatabaseJob.
This populates the parameters with values that match the geodatabase sync task's feature service and the geodatabase. For a geodatabase with SyncModel.layer then all geodatabase layers will be included. If the service is read-only then the sync direction will be SyncDirection.download. Otherwise the sync direction will be SyncDirection.bidirectional.
Parameters:
geodatabase
— a geodatabase to sync.
Return Value: Returns a sync parameters object with defaults populated.
The returned Future contains a SyncGeodatabaseParameters
.
Implementation
Future<SyncGeodatabaseParameters> createDefaultSyncGeodatabaseParameters(
{required Geodatabase geodatabase}) {
final taskHandle = _withThrowingErrorHandler((errorHandler) {
return runtimecore
.RT_GeodatabaseSyncTask_createDefaultSyncGeodatabaseParametersAsync(
_handle, geodatabase._handle, errorHandler);
});
return taskHandle
.toFuture((element) => element.getValueAsSyncGeodatabaseParameters()!);
}