GetLibraryVersion static method

String GetLibraryVersion()

Returns the version of this library.

The function throws a LexActivatorException on error.

Implementation

static String GetLibraryVersion() {
  final array = calloc<Uint8>(256);
  int status = _lexActivatorNative.GetLibraryVersion(
    array.cast(),
    256,
  );

  if (LexStatusCodes.LA_OK != status) {
    throw LexActivatorException(status);
  }

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