GetTrialId static method

String GetTrialId()

Returns the trial activation ID to be used in case of trial extensions.

The function throws a LexActivatorException on error.

Implementation

static String GetTrialId() {
  final array = calloc<Uint8>(256);

  int status = _lexActivatorNative.GetTrialId(array.cast(), 256);
  if (LexStatusCodes.LA_OK != status) {
    throw LexActivatorException(status);
  }

  final trialId = convertArrayToDartString(array);
  calloc.free(array);
  return trialId.trim();
}