NativeByte constructor

NativeByte(
  1. Pointer<Void> bytes,
  2. int lengthInBytes
)

Implementation

NativeByte(Pointer<Void> bytes, int lengthInBytes) {
  if (Platform.isIOS || Platform.isMacOS) {
    raw = NSData(bytes, lengthInBytes);
  } else if (Platform.isAndroid) {
    raw = DirectByteBuffer(bytes, lengthInBytes);
  } else {
    throw 'Platform not supported: ${Platform.localeName}';
  }
}