setCredentials method

void setCredentials(
  1. SyncCredentials creds
)

Configure authentication credentials, depending on your server config.

Implementation

void setCredentials(SyncCredentials creds) {
  if (creds._type == OBXSyncCredentialsType.NONE) {
    checkObx(C.sync_credentials(_ptr, creds._type, nullptr, 0));
  } else {
    withNativeBytes(
        creds._data,
        (Pointer<Uint8> credsPtr, int credsSize) => checkObx(
            C.sync_credentials(_ptr, creds._type, credsPtr, credsSize)));
  }
}