create static method

Future<Geodatabase> create({
  1. required Uri fileUri,
})

Creates an empty mobile geodatabase at the specified path.

The path must be non-empty, available, allow read/write access, and end in ".geodatabase". If any of these restrictions are violated, the task will not succeed and a task error will be set.

Parameters:

  • fileUri — The path at which the mobile geodatabase is created.

Return Value: A Future that returns a Geodatabase in a loaded state, if one was able to be created at the specified path.

Implementation

static Future<Geodatabase> create({
  required Uri fileUri,
}) {
  _initializeArcGISEnvironmentIfNeeded();
  final coreFileUri = _CString(fileUri.toFilePath());
  final taskHandle = _withThrowingErrorHandler((errorHandler) {
    return runtimecore.RT_Geodatabase_createAsync(
      coreFileUri.bytes,
      errorHandler,
    );
  });
  return taskHandle.toFuture(
    (element) => element.getValueAsGeodatabase()!,
  );
}