fromParams static method

Pointer<TXDeviceInfoStruct> fromParams(
  1. TXDeviceInfo deviceInfo
)

Implementation

static Pointer<TXDeviceInfoStruct> fromParams(TXDeviceInfo deviceInfo) {
  final deviceInfoPointer = calloc<TXDeviceInfoStruct>();
  deviceInfoPointer.ref
    ..device_pid = deviceInfo.devicePid.toNativeUtf8().cast<Char>()
    ..device_name = deviceInfo.deviceName.toNativeUtf8().cast<Char>()
    ..device_properties = deviceInfo.deviceProperties.toNativeUtf8().cast<Char>()
    ..device_pid_len = deviceInfo.devicePid.length
    ..device_name_len = deviceInfo.deviceName.length
    ..device_properties_len = deviceInfo.deviceProperties.length;
  return deviceInfoPointer;
}