Quaternion.fromBuffer constructor Null safety

Quaternion.fromBuffer(
  1. ByteBuffer buffer,
  2. int offset
)

Constructs a quaternion with a storage that views given buffer starting at offset. offset has to be multiple of Float32List.bytesPerElement.

Implementation

Quaternion.fromBuffer(ByteBuffer buffer, int offset)
    : _qStorage = Float32List.view(buffer, offset, 4);