Vector4.fromBuffer constructor Null safety

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

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

Implementation

Vector4.fromBuffer(ByteBuffer buffer, int offset)
    : _v4storage = Float32List.view(buffer, offset, 4);