deleteModel static method

bool deleteModel(
  1. String modelId,
  2. int framework
)

Delete a model folder.

Implementation

static bool deleteModel(String modelId, int framework) {
  final lib = _lib();
  if (lib == null || _callbacksPtr == null) return false;
  final fn = lib.lookupFunction<
      Int32 Function(Pointer<RacFileCallbacksStruct>, Pointer<Utf8>, Int32),
      int Function(Pointer<RacFileCallbacksStruct>, Pointer<Utf8>,
          int)>('rac_file_manager_delete_model');

  final modelIdPtr = modelId.toNativeUtf8();
  try {
    return fn(_callbacksPtr!, modelIdPtr, framework) == RacResultCode.success;
  } finally {
    calloc.free(modelIdPtr);
  }
}