asTypedList method

Uint32List asTypedList()

Returns a typed view of this buffer. Note: The lifetime of this view is tied to the lifetime of this FfiBufferUint32. This Uint32List must not live longer than the creating FfiBufferUint32

Implementation

Uint32List asTypedList() {
  final buffer = _box.borrow();
  final addressRaw = _api._ffiBufferAddress(buffer);
  final size = _api._ffiBufferSize(buffer) ~/ 4;
  return ffi.Pointer<ffi.Uint32>.fromAddress(addressRaw).asTypedList(size);
}