PointerBuffer<T extends NativeType>.fromPointer constructor Null safety

PointerBuffer<T extends NativeType>.fromPointer(
  1. Pointer<NativeType> sourcePtr
)

Implementation

PointerBuffer.fromPointer(Pointer sourcePtr) {
  ptr = sourcePtr.cast();
  Int64List ptrData = ptr.cast<Int64>().asTypedList(3);

  _elementSizePointer = Pointer.fromAddress(ptrData[0]);
  _sizePointer = Pointer.fromAddress(ptrData[1]);
  _dataPointer = Pointer.fromAddress(ptrData[2]);
}