GetLicenseMetadata static method

String GetLicenseMetadata({
  1. required String key,
})

Returns the license metadata for the passed key value, as set in the dashboard.

The function throws a LexActivatorException on error.

Implementation

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