bytesToInt static method
Implementation
static int bytesToInt(List<int> bytes, {bool littleEndian = true}) {
int value = 0;
int length = bytes.length;
if (littleEndian) {
for (int i = 0; i < length; i++) {
value += bytes[i] << (i * 8);
}
} else {
for (int i = 0; i < length; i++) {
value += bytes[i] << ((length - 1 - i) * 8);
}
}
return value;
}