readArray method Null safety

List readArray(
  1. int length
)

Reads a List from the backing buffer

  • length: The number of bytes

Implementation

List readArray(int length) {
  final res = []..length = length;
  for (var i = 0; i < length; ++i) {
    res[i] = read();
  }
  return res;
}