readTuple method

Uint8List? readTuple(
  1. int slotIdx
)

Implementation

Uint8List? readTuple(int slotIdx) {
  if (slotIdx < 0 || slotIdx >= slotCount) return null;
  if (!isAlive(slotIdx)) return null; // tombstone
  final off = _slotTupleOffset(slotIdx);
  final len = _slotTupleLength(slotIdx);
  if (off < PageConst.headerSize || off + len > PageConst.pageSize) return null;
  return Uint8List.fromList(_buf.sublist(off, off + len));
}