fromPointer static method

LocalKeyHandle fromPointer(
  1. ErrorCode errorCode,
  2. Pointer<NativeLocalKeyHandle> ptr
)

Creates a LocalKeyHandle from a pointer.

The errorCode indicates the success or failure of the operation. The ptr is a pointer to the native local key handle.

Implementation

static LocalKeyHandle fromPointer(
  ErrorCode errorCode,
  Pointer<NativeLocalKeyHandle> ptr,
) {
  return LocalKeyHandle(errorCode == ErrorCode.success ? ptr.value : 0);
}