GetLicenseUserName static method

String GetLicenseUserName()

Returns the name associated with the license user.

The function throws a LexActivatorException on error.

Implementation

static String GetLicenseUserName() {
  final array = calloc<Uint8>(256);
  int status = _lexActivatorNative.GetLicenseUserName(
    array.cast(),
    256,
  );
  if (LexStatusCodes.LA_OK != status) {
    throw LexActivatorException(status);
  }
  final licenseUserName = convertArrayToDartString(array);
  calloc.free(array);
  return licenseUserName.trim();
}