getBigUint method

BigInt getBigUint(
  1. int offset,
  2. int length, [
  3. Endian endian = Endian.little
])

Reads a region of the buffer as an unsigned big integer.

Items are read from the range [offset : offset+length].

The range must satisy the relations 0offsetoffset+lengththis.length.

final Buffer buffer = Buffer.fromList([255, 255, 255, 255, 255, 255, 255, 255]);
final BigInt value = buffer.getBigUint(0, buffer.length);
print(value); // 18446744073709551615

Implementation

BigInt getBigUint(final int offset, final int length,
    [final Endian endian = Endian.little]) {
  final Iterable<int> bytes = _data.getRange(offset, offset + length);
  return endian == Endian.big ? _getBigUintBE(bytes) : _getBigUintLE(bytes);
}