readBytes static method

BigInt readBytes(
  1. Uint8List bytes
)

Implementation

static BigInt readBytes(Uint8List bytes) {
  BigInt result = BigInt.zero;

  if (Endian.host == Endian.big) {
    for (final byte in bytes) {
      result = (result << 8) | BigInt.from(byte);
    }
  } else {
    for (final byte in bytes) {
      result = (result << 8) | BigInt.from(byte & 0xff);
    }
  }
  return result;
}