nullTerminatedList property Null safety

List<int> nullTerminatedList

Reads a null terminated list of ints from the buffer. Returns the list of ints from the buffer, without the terminating zero.

Implementation

List<int> get nullTerminatedList {
  List<int> s = <int>[];
  while (data[_readPos] != 0) {
    s.add(data[_readPos]);
    _readPos++;
  }
  _readPos++;

  return s;
}