GetProductMetadata static method

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

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

This is available for trial as well as license activations.

The function throws a LexActivatorException on error.

Implementation

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