readUint16BE function
Reads a 16-bit unsigned integer value in big-endian byte order from a list.
Implementation
int readUint16BE(List<int> data, [int offset = 0]) {
if (offset < 0 || offset + 2 > data.length) {
throw RangeError('Index out of bounds');
}
return ((data[offset] & mask8) << 8) | (data[offset + 1] & mask8);
}