fromUint8List static method

BigInt fromUint8List(
  1. Iterable<int> bytes, [
  2. Endian endian = Endian.little
])

Creates a BigInt from an array of bytes.

final BigInt value = BigIntExtension.fromUint8List([255, 255, 255, 255, 255, 255, 255, 255]);
print(value); // 18446744073709551615

Implementation

static BigInt fromUint8List(final Iterable<int> bytes, [final Endian endian = Endian.little]) {
  return Buffer.fromList(bytes).getBigUint(0, bytes.length, endian);
}