ScalarListView constructor Null safety

ScalarListView(
  1. int length,
  2. [int offset = 0,
  3. int stride = 0]
)

Create a new vector list with length elements.

Optionally it is possible to specify an offset in the buffer and a stride between each vector.

Implementation

ScalarListView(int length, [int offset = 0, int stride = 0])
    : _offset = offset,
      _stride = stride == 0 ? 1 : stride,
      _length = length,
      _buffer = Float32List(_listLength(offset, stride, length));