toNative method

  1. @override
Pointer<NativeDisplayAdapterId> toNative({
  1. Allocator allocator = malloc,
})

Copy the T to unmanaged memory and return a pointer to the memory location.

It is the caller's responsibility to free the memory at the pointer location, for example by calling calloc's free method.

Implementation

@override
Pointer<NativeDisplayAdapterId> toNative({Allocator allocator = malloc}) {
  final nativeStructPtr = allocator<NativeDisplayAdapterId>();
  nativeStructPtr.ref
    ..lowPart = lowPart
    ..highPart = highPart;
  return nativeStructPtr;
}