convertToUint64List method

Uint64List convertToUint64List(
  1. int length, [
  2. Endian endian = Endian.big
])

Copies this ByteData buffer to an Uint64List of length.

Implementation

Uint64List convertToUint64List(int length, [Endian endian = Endian.big]) {
  _checkLengthRange(length, 8);

  if (Endian.host == endian) {
    return Uint64List.fromList(buffer.asUint64List(offsetInBytes, length));
  }

  var ns = Uint64List(length);

  for (var i = 0; i < length; ++i) {
    var n = getUint64(i * 8, endian);
    ns[i] = n;
  }

  return ns;
}