strByteDataToPointer static method

Pointer<Utf16> strByteDataToPointer(
  1. ByteData data
)

Implementation

static Pointer<Utf16> strByteDataToPointer(ByteData data) {
  var units = data.buffer.asUint8List(data.offsetInBytes, data.lengthInBytes);
  var result = utf8.decode(units);
  return result.toNativeUtf16();
}